Click here to Skip to main content
15,885,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,

I save as my one .aspx page in asp.net after save the new page has no .cs file only .aspx file

how can i add my .cs file for .aspx file plz suggest me
Posted
Comments
Sebastian T Xavier 17-Jul-12 2:19am    
Are you using visual studio?

When you add a new aspx page there is one option under the page with the checkbox that Place Code in Separate File. Just check this and u get automatically get the .cs file for your aspx page.
 
Share this answer
 
Comments
[no name] 17-Jul-12 5:55am    
5!
hi,

if you are using Visual Studio, once you add any .aspx page, the code file will also created. check in the HDD project folder, do you see the code file? if yes, then Go to solution explorer is visual studio, right click on the aspx page and click "View Code". then you will find the code file.
 
Share this answer
 
If you are using Visual Studio, then when you are adding a new ASPX file to your website or solution, there would be a checkbox saying Place code in separate file. If you select the checkbox, VS will create a CS file along with your ASPX file.
 
Share this answer
 
If you are using Visual studio then while adding the web page it gives an option to "Put Code in Separate File".

if this option is checked then only the page will contain a separate code behind .cs file. otherwise visual studio assumes that you will be putting your C# code inside the aspx page under script tags.

If you still need to add .cs file to a web page follow the conventions in this links and you should be able to ad it:

http://support.microsoft.com/kb/303247[^]
http://blogs.msdn.com/b/mikhailarkhipov/archive/2006/04/13/576117.aspx[^]
 
Share this answer
 
Comments
vinaya h a 6-Sep-16 4:05am    
what are the delegates and events in wpf And where they will be used?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900