PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms ASCX

Reply

ASCX

 
Thread Tools Rate Thread
Old 30-03-2004, 03:50 AM   #1
A-PK
Guest
 
Posts: n/a
Default ASCX


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


  Reply With Quote
Old 30-03-2004, 04:27 AM   #2
Scott M.
Guest
 
Posts: n/a
Default Re: ASCX

..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.

" A-PK" <piercekerk@hotmail.com> wrote in message
news:%23aV%23zGgFEHA.1064@TK2MSFTNGP12.phx.gbl...
> 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
>
>



  Reply With Quote
Old 30-03-2004, 07:26 AM   #3
A-PK
Guest
 
Posts: n/a
Default Re: ASCX

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

"Scott M." <s-mar@BADSPAMsnet.net> wrote in message
news:ukFfdcgFEHA.1600@tk2msftngp13.phx.gbl...
> .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.
>
> " A-PK" <piercekerk@hotmail.com> wrote in message
> news:%23aV%23zGgFEHA.1064@TK2MSFTNGP12.phx.gbl...
> > 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
> >
> >

>
>



  Reply With Quote
Old 30-03-2004, 09:12 AM   #4
Guest
 
Posts: n/a
Default Re: ASCX

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
" A-PK" <piercekerk@hotmail.com> wrote in message
news:%23nGqy$hFEHA.1128@TK2MSFTNGP11.phx.gbl...
>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
>
> "Scott M." <s-mar@BADSPAMsnet.net> wrote in message
> news:ukFfdcgFEHA.1600@tk2msftngp13.phx.gbl...
>> .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.
>>
>> " A-PK" <piercekerk@hotmail.com> wrote in message
>> news:%23aV%23zGgFEHA.1064@TK2MSFTNGP12.phx.gbl...
>> > 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
>> >
>> >

>>
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off