Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 16, 2013 07:45 PM by Rion Williams
Jan 14, 2013 08:30 PM|LINK
i have a default.aspx form created by someone i want to view the code, when i cllick on the view code link its shows me the html coding means font coding but i want to view the C# back end coding how i can solve the problem?
please help me..
Jan 14, 2013 08:35 PM|LINK
If you are referring to visiting a default.aspx page online and clicking View Source, then you are not going to be able to view the code-behind on that page. (This is intended as it is referred to as "code-behind" for a reason)
ASPX pages are composed of two parts from a development standpoint:
I'm sure there are decompilers out there that exist for this very purpose, however if you use one don't expect to see exactly what is in the actual code-behind for the site.
Jan 14, 2013 09:08 PM|LINK
i have all the file on my machine. not in online page. yes it is the possible cause that decompilers is exist ! but how i can get rid of it? is there any way to view the actual code behind ? all the needed file is available on my pc for the project.
Jan 14, 2013 09:13 PM|LINK
You should have two files as mentioned before (default.aspx and default.aspx.cs file) and on your machine you should be able to go into your IDE (Visual Studio or Visual Web Developer) and open the default.aspx.cs file.
You should see your file(s) appear and you should be able to double-click on one of them, or right-click and Select View Code to access the code-behind.
If you don't have any IDEs installed - you can use Notepad to open it as well.
Jan 16, 2013 03:34 PM|LINK
please see the image.. i am unable to upload the image here.. there is a default2.aspx which i recently created tha has a .cs file but no other web form has any .cs file why?
how i can view the .cs file of the others?
Jan 16, 2013 03:57 PM|LINK
You should be able to Right-Click on one of your .aspx pages that does not have an associated .cs file and select the View Code option. This should allow you to view the code-behind for the page.
If your .cs file does not appear after doing this, click the Refresh button within your Solution Explorer to update your files.
Jan 16, 2013 05:54 PM|LINK
Rion williams ,
you are right . but have you seen the image? there are no node for the othere web form, and when i click on view code it shows the html code page. in that page when i click right button there are no any option like view code. can you tell me why?
thanks for giving me time.... thanks alot.
Jan 16, 2013 07:21 PM|LINK
That is bizarre. How did you create your .aspx pages? Did you use the Right-Click => Add => New Item =>Web Form?
Jan 16, 2013 07:38 PM|LINK
i have written earlier that those web form is not created by me. some one created those. i create the default2.aspx and that has the .cs file but those have nothing. how come? i want the answer? can u help me? is there any process to hide the .cs file?
Jan 16, 2013 07:45 PM|LINK
Bizarre means strange. (I was saying that this was a strange issue.)
However - if you recieved the .aspx page from someone and don't have the associated .cs page, it is liked a compiled version of the .aspx page and you most likely won't be able to access the code-behind in it. (Without using a decompiler, which can make
things quite messy.)
Basically - it isn't hidden within your solution, it has been compiled into your .aspx page.