Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2004

Tip: Looking for answers? Try searching our database.

ASCX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
A-PK - 30 Mar 2004 03:50 GMT
Hi, I have notice some file with extension *.ascx

Could someone tell me more about it.
I am currently got a fully done web project, but the files with extension
*.aspx
Is there any way to compile such file to *.ascx.

Or perhaps someone could tell me how to create *.ascx
some useful reference would be great if got.

thank you
Scott M. - 30 Mar 2004 04:27 GMT
.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.

> Hi, I have notice some file with extension *.ascx
>
[quoted text clipped - 7 lines]
>
> thank you
A-PK - 30 Mar 2004 07:26 GMT
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
- 30 Mar 2004 09:12 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.