Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
Hi,

how to change extension in address bar is like a .aspx, ascx
where can add code???
Posted
Comments
Kuthuparakkal 1-Nov-12 4:20am    
Need more info
bbirajdar 1-Nov-12 4:47am    
Do you really see .ascx ' in address bar ?

1 solution

.ascx extension user for when we want to define our self user control.
following step use must follow when you make your own usercontrol
1 rename .aspx extension into .ascx
2 html base class of @page (1st line of html code) change into @control
3 remove body and head tag
4 main code of asp.net go to 1 st line is it like this :
public partial class _Default : System.Web.UI.Page
change into
public partial class _Default : System.Web.UI.UserCXontrol
 
Share this answer
 

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