.ascx files are UserControls. UserControls are like fragments of a page
that can be used over and over again inside of other pages.
You create .ascx pages the same way you create .aspx pages only the
declaration lines are a bit different. Just open up one of those .ascx
files you've come across and take a look.
i found the ASP.NET Portal sample is great.
i am thinking to write in some ascx coding, and use the Add Module there to
add the new ascx file that I have created. but i have no idea how to do it.
could you guide me ?
how do make a ascx file that is similar to ASP.net portal sample one
> .ascx files are UserControls. UserControls are like fragments of a page
> that can be used over and over again inside of other pages.
[quoted text clipped - 14 lines]
> >
> > thank you
Assuming you hav a ASP.NET Project open and are using VS.NET
just go to Project -> Add User Control
Double click on the new ASCX file that you have and then you will be taken
to CodeView namely the Page_Load Section
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine("This Line Will be placed where my control is
situated");
base.Render (writer);
}
Compile and make sure there are no errors.
Then Go to the Web Form you wish to use the control on.
With the Solution Explorer open drag the ASCX file onto your WebForm File
Switch to HTML View and move the Control in the exact position you want it
Hope that helps.
right click and synchronoize Class View -> expand the class and
>i found the ASP.NET Portal sample is great.
> i am thinking to write in some ascx coding, and use the Add Module there
[quoted text clipped - 24 lines]
>> >
>> > thank you