Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > #include equivalent for aspnet

Reply
Thread Tools

#include equivalent for aspnet

 
 
dee
Guest
Posts: n/a
 
      08-14-2005
Several pages in our site use the same code. Is there a way to use the same
idea as the old C #include technique in an aspnet application.
Thanks.
Dee


 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      08-14-2005
"dee" <(E-Mail Removed)> wrote in
news:O#$(E-Mail Removed):

> Several pages in our site use the same code. Is there a way to use the
> same idea as the old C #include technique in an aspnet application.


Couple ways of doing this... depending on the type of code:

1. Build a User Control / Custom Control
2. Build a shared DLL
3. Use MasterPages to build a template system





--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
 
Jon Paal
Guest
Posts: n/a
 
      08-14-2005
You can do as Lucas suggested or use server side includes which are still
supported


"dee" <(E-Mail Removed)> wrote in message
news:O%23$(E-Mail Removed)...
> Several pages in our site use the same code. Is there a way to use the
> same idea as the old C #include technique in an aspnet application.
> Thanks.
> Dee
>
>



 
Reply With Quote
 
dee
Guest
Posts: n/a
 
      08-14-2005
Thanks

"Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
news:%(E-Mail Removed)...
> You can do as Lucas suggested or use server side includes which are still
> supported
>
>
> "dee" <(E-Mail Removed)> wrote in message
> news:O%23$(E-Mail Removed)...
>> Several pages in our site use the same code. Is there a way to use the
>> same idea as the old C #include technique in an aspnet application.
>> Thanks.
>> Dee
>>
>>

>
>



 
Reply With Quote
 
dee
Guest
Posts: n/a
 
      08-14-2005
Thanks.

"Lucas Tam" <(E-Mail Removed)> wrote in message
news:Xns96B27BE5558Bnntprogerscom@127.0.0.1...
> "dee" <(E-Mail Removed)> wrote in
> news:O#$(E-Mail Removed):
>
>> Several pages in our site use the same code. Is there a way to use the
>> same idea as the old C #include technique in an aspnet application.

>
> Couple ways of doing this... depending on the type of code:
>
> 1. Build a User Control / Custom Control
> 2. Build a shared DLL
> 3. Use MasterPages to build a template system
>
>
>
>
>
> --
> Lucas Tam ((E-Mail Removed))
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/



 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      08-15-2005
Include files are old fashioned.
User controls are a better approach. Yes, they can contain any kind of
controls you'd like. You can create public properties, methods, and events
to facilitate communication between the user control and the page.
Even better is the "Master Pages" functionality that will be included with
ASP.NET 2.0.

Here's more info:
http://SteveOrr.net/faq/UserCustom.aspx
http://aspnet.4guysfromrolla.com/articles/010505-1.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"dee" <(E-Mail Removed)> wrote in message
news:O%23$(E-Mail Removed)...
> Several pages in our site use the same code. Is there a way to use the
> same idea as the old C #include technique in an aspnet application.
> Thanks.
> Dee
>
>



 
Reply With Quote
 
dee
Guest
Posts: n/a
 
      08-15-2005
Thanks

"Steve C. Orr [MVP, MCSD]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Include files are old fashioned.
> User controls are a better approach. Yes, they can contain any kind of
> controls you'd like. You can create public properties, methods, and
> events
> to facilitate communication between the user control and the page.
> Even better is the "Master Pages" functionality that will be included with
> ASP.NET 2.0.
>
> Here's more info:
> http://SteveOrr.net/faq/UserCustom.aspx
> http://aspnet.4guysfromrolla.com/articles/010505-1.aspx
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "dee" <(E-Mail Removed)> wrote in message
> news:O%23$(E-Mail Removed)...
>> Several pages in our site use the same code. Is there a way to use the
>> same idea as the old C #include technique in an aspnet application.
>> Thanks.
>> Dee
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the aspnet account called "aspnet" for all non-English versions of Windows and IIS? torus@tpg.com.au ASP .Net 7 03-23-2007 04:00 AM
datakeynames equivalent of aspnet 2.0 jokiz ASP .Net Web Controls 0 10-20-2005 10:03 AM
Upgrade from aspnet 1.1 to aspnet 2.0 Gary Nelson ASP .Net 2 10-14-2005 05:16 PM
microsoft.public.dotnet.framework.aspnet.webcontrols ,microsoft.public.dotnet.framework.aspnet Alfred Sehmueller ASP .Net Web Controls 0 02-20-2004 02:39 PM
Restricting ASPNET ACLs without breaking ASPNET (newbie-ish) Brian Schuth ASP .Net Security 0 09-08-2003 06:09 PM



Advertisments