I double click on a control and the code is put in the HTML file not in the code behind

for some reason when i I double click on a control. the code gets put in the HTML file and not in the code behind cs file

 how can I fix it so when ever I drag a countrol, double click on it, the code gets generated in the code behind

0
sean2020
12/28/2007 9:22:13 PM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 4 followers.

💬 4 Replies
👁️‍🗨️ 1126 Views

 When you go to add a file to the project, there is a checkbox for if the code should be in a codebehind file. Did you check that box?


Please Mark As Answer posts that helped you.

"If we learn from our mistakes, I should be brilliant by now."

0
nikki_doer_of_things
12/28/2007 9:32:35 PM

Hi Sean,

Based on my understanding, you want to write the server code in the code behind class of asp.net page. If I have misunderstood you, please feel free to let me know.

ASP.NET supports two methods to author pages: In-line code and code behind.

In your case, the server code is embedded directly within the ASP.NET page. If we want the ASP.NET page to be contained within a separate class file, we can select the “Place code in separate file” checkbox when we create the new page.

 

Happy New Year!

I hope this helps. 


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
12/31/2007 1:41:20 AM

Thomas Sun – MSFT:

 we can select the “Place code in separate file” checkbox when we create the new page.

 

for some reason I don't have this checkbox :( 

0
sean2020
1/2/2008 2:43:36 PM

Hi,

Thanks for your response.

Usually, the “Place code in separate file” checkbox is in the Add New Item Window when we add the web form page.


To better understand your issue, could you please confirm the following information:

  • What version of Visual Studio or Visual Web Developer are you using?
  • What develop langue are you using?
  • Did you install the latest update for them?

 

I hope this helps. 


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
1/3/2008 2:07:27 AM
Reply: