how do I define 1 menu, fonts etc.. for an entire web app.

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Grac » Sun, 06 Oct 2002 01:04:28



Hi,

I am fairly new to ASP.NET so bear with me please.

I have made a user control which contains buttons for a type of menu. It has
vb.net onclick code to launch different pages.

When I include it in every other web form, sometimes the events do not fire.

Does ASP.NET have an include facility so that I can create some code once
and reference it in my pages. and so that I can set global things like fonts
etc.. that every page can use?

Sorry if this is a bit vague.

Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Steve C. Orr, MCS » Sun, 06 Oct 2002 01:18:48


User controls are the primary way to include this type of functionality in
VB.NET
As for why your events aren't firing sometimes, I don't have enough
information to answer that, but I'd say you likely have a bug.
Maybe show us some source code?

As for setting global fonts & colors, you probably should use CSS (Cascading
Style Sheets).

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


Quote:> Hi,

> I am fairly new to ASP.NET so bear with me please.

> I have made a user control which contains buttons for a type of menu. It
has
> vb.net onclick code to launch different pages.

> When I include it in every other web form, sometimes the events do not
fire.

> Does ASP.NET have an include facility so that I can create some code once
> and reference it in my pages. and so that I can set global things like
fonts
> etc.. that every page can use?

> Sorry if this is a bit vague.

> Mike


 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Constance J. Peterse » Sun, 06 Oct 2002 01:20:47


Hi Mike,


Quote:> I have made a user control which contains buttons for a type of menu. It has
> vb.net onclick code to launch different pages.
> When I include it in every other web form, sometimes the events do not fire.

Without seeing your code, it's hard to say why it's not working for you. That's
definitely a common use for a user control.

Quote:> Does ASP.NET have an include facility so that I can create some code once
> and reference it in my pages. and so that I can set global things like fonts
> etc.. that every page can use?

For setting fonts, you should learn about CSS (cascading stylesheets). They are
fully supported in ASP.NET, and they will let you control fonts, colors, and
even layout for all pages on your site. You can then change one stylesheet to
change the entire look of a site.

You may also be interested in learning another technique for creating a single
visual Web page template to handle a common look across your Web site. This
article and demo does incorporate a user control for menu navigation.

Creating a Visual Web Page Template
http://www.smartisans.com/articles/vb_templates.aspx

--
Constance Petersen
Build a great Web site: http://www.smartisans.com/
New ASP.NET book: "Programming the Web with Visual Basic .NET"
http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constancepete...

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Grac » Tue, 08 Oct 2002 18:30:32


Hi,

I am fairly new to ASP.NET so bear with me please.

I have made a user control which contains buttons for a type of menu. It has
vb.net onclick code to launch different pages.

When I include it in every other web form, sometimes the events do not fire.

Does ASP.NET have an include facility so that I can create some code once
and reference it in my pages. and so that I can set global things like fonts
etc.. that every page can use?

Sorry if this is a bit vague.

Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Constance J. Peterse » Tue, 08 Oct 2002 21:23:49


Hi Mike,

You already have two responses to your first post. Did you see them?

--
Constance Petersen
Build a great Web site: http://www.smartisans.com/
New ASP.NET book: "Programming the Web with Visual Basic .NET"
http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constancepete...


Quote:> Hi,

> I am fairly new to ASP.NET so bear with me please.

> I have made a user control which contains buttons for a type of menu. It has
> vb.net onclick code to launch different pages.

> When I include it in every other web form, sometimes the events do not fire.

> Does ASP.NET have an include facility so that I can create some code once
> and reference it in my pages. and so that I can set global things like fonts
> etc.. that every page can use?

> Sorry if this is a bit vague.

> Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Moore [MS » Wed, 09 Oct 2002 05:35:00


Hi Mike,

In your current post, you acknowledged that your question is vague. I
looked at your previous post, along with the responses from Steve and
Constance. Your current post shows that you created a user control, per
their advice. But, it doesn't show how your current post differs from your
previous post  --  meaning that the current post doesn't show where you're
stuck.

I suggest that you go back to that thread and continue with it. Add a post
showing how far you've gotten and where you're getting stuck currently.

Thank you, Mike Moore
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.

--------------------



>Subject: Re: how do I define 1 menu, fonts etc.. for an entire web app.
>Date: Mon, 7 Oct 2002 08:23:49 -0400
>Lines: 33
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 207.75.49.183
>Path: cpmsftngxa09!cpmsftngxa08!tkmsftngxs01!tkmsftngp01!tkmsftngp09
>Xref: cpmsftngxa09 microsoft.public.dotnet.framework.aspnet:92997
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

>Hi Mike,

>You already have two responses to your first post. Did you see them?

>--
>Constance Petersen
>Build a great Web site: http://www.smartisans.com/
>New ASP.NET book: "Programming the Web with Visual Basic .NET"
>http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constancepete...



>> Hi,

>> I am fairly new to ASP.NET so bear with me please.

>> I have made a user control which contains buttons for a type of menu. It
has
>> vb.net onclick code to launch different pages.

>> When I include it in every other web form, sometimes the events do not
fire.

>> Does ASP.NET have an include facility so that I can create some code once
>> and reference it in my pages. and so that I can set global things like
fonts
>> etc.. that every page can use?

>> Sorry if this is a bit vague.

>> Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Grac » Wed, 09 Oct 2002 18:01:50


Sorry, I can't see my previous post. Thats why I posted again.

I'll try and find it.

Regards

Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Gra » Wed, 09 Oct 2002 18:18:38


Thank you both for your replies. I will study your information and see
what I can do.

Thanks you both once again.

Mike


> Hi Mike,



> > I have made a user control which contains buttons for a type of menu. It has
> > vb.net onclick code to launch different pages.
> > When I include it in every other web form, sometimes the events do not fire.

> Without seeing your code, it's hard to say why it's not working for you. That's
> definitely a common use for a user control.

> > Does ASP.NET have an include facility so that I can create some code once
> > and reference it in my pages. and so that I can set global things like fonts
> > etc.. that every page can use?

> For setting fonts, you should learn about CSS (cascading stylesheets). They are
> fully supported in ASP.NET, and they will let you control fonts, colors, and
> even layout for all pages on your site. You can then change one stylesheet to
> change the entire look of a site.

> You may also be interested in learning another technique for creating a single
> visual Web page template to handle a common look across your Web site. This
> article and demo does incorporate a user control for menu navigation.

> Creating a Visual Web Page Template
> http://www.smartisans.com/articles/vb_templates.aspx

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Mike Moore [MS » Thu, 10 Oct 2002 06:57:34


Hi Mike,

You wrote that you're having trouble finding your previous thread. Below is
a repeat of the conversation.

Thank you, Mike Moore
      Microsoft, ASP.NET

This posting is provided "AS IS" with no warranties, and confers no rights.

--------


Quote:> I have made a user control which contains buttons for a type of menu. It
has
> vb.net onclick code to launch different pages.
> When I include it in every other web form, sometimes the events do not

fire.

Without seeing your code, it's hard to say why it's not working for you.
That's
definitely a common use for a user control.

Quote:> Does ASP.NET have an include facility so that I can create some code once
> and reference it in my pages. and so that I can set global things like
fonts
> etc.. that every page can use?

For setting fonts, you should learn about CSS (cascading stylesheets). They
are
fully supported in ASP.NET, and they will let you control fonts, colors, and
even layout for all pages on your site. You can then change one stylesheet
to
change the entire look of a site.

You may also be interested in learning another technique for creating a
single
visual Web page template to handle a common look across your Web site. This
article and demo does incorporate a user control for menu navigation.

Creating a Visual Web Page Template
http://www.smartisans.com/articles/vb_templates.aspx

--
Constance Petersen
Build a great Web site: http://www.smartisans.com/
New ASP.NET book: "Programming the Web with Visual Basic .NET"
http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constancepete...


Quote:>User controls are the primary way to include this type of functionality in
>VB.NET
>As for why your events aren't firing sometimes, I don't have enough
>information to answer that, but I'd say you likely have a bug.
>Maybe show us some source code?

>As for setting global fonts & colors, you probably should use CSS

(Cascading

>Style Sheets).

>I hope this helps,
>Steve C. Orr, MCSD
>http://Steve.Orr.net


>>Hi,

>>I am fairly new to ASP.NET so bear with me please.

>>I have made a user control which contains buttons for a type of menu. It
has
>>vb.net onclick code to launch different pages.

>>When I include it in every other web form, sometimes the events do not
fire.

>>Does ASP.NET have an include facility so that I can create some code once
>>and reference it in my pages. and so that I can set global things like
fonts
>>etc.. that every page can use?

>>Sorry if this is a bit vague.

>>Mike

 
 
 

how do I define 1 menu, fonts etc.. for an entire web app.

Post by Thomas Eyd » Thu, 10 Oct 2002 16:22:18


If your user controls have additional code created controls, you must ensure
they are created in the PageLoad event. I experienced that problem with my
controls which needs external data provided to create those items.

That is, I have a user control with a method like this: public void
SetData(ArrayList list). When I call SetData, the control will iterate over
the list and create clickable items for each entry. Whenever I forget to
call SetData in the containing PageLoad none of its events are fired.

Does this help?

Thomas Eyde


Quote:> I have made a user control which contains buttons for a type of menu. It
has
> vb.net onclick code to launch different pages.

> When I include it in every other web form, sometimes the events do not

fire.
 
 
 

1. User Defined Menu in VB which supports Arabic, Chinese e.t.c....

Hai All,

        I would like to know if any one has created a User-Defines menu in Visual Basic which can support other languages like Chinese, Arabic, e.t.c... I will be glad and will be very very thankful if anyone can help me in this regard. Thanks in advance.

Regards,
Raj

Ch. Hemantha Raj
R&D Developer,
net-linx Asia Pacific Sdn Bhd,
53rd Floor, Tower 2,
Petronas Twin Towers,
Kuala Lumpur City Centre (KLCC),
50088, Kuala Lumpur,
Malaysia.
Ph  : (+603) 382 7878 Ext 204
Fax: (+603) 3827879

www.net-linx.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

2. SQL7 compatible w/win2k?

3. Strange behavior doing xcopy deployment of web app

4. IBMINT13 test results

5. C, C++ , C#, VC++, etc etc etc WHAT to do?

6. 4 Direct Client Req's (Oracle EBS,Java Developer,VMware Admin,Unix Admin) Please respond to karan@hmgamerica.com

7. How can I change ListViewSubItem colors, fonts, etc?

8. Using your Nokia phone with PPC to link to the internet via IrDA

9. define toolbar font

10. Changing Fonts used by Visual Studio - Can it be done?

11. Why vsnet does NOT support the menu with Icon as delphi has done?

12. C#'s menus... can it be done??

13. run apps, links, pictures etc.