Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Where culture?

Reply
Thread Tools

Where culture?

 
 
odwrotnie
Guest
Posts: n/a
 
      08-05-2006
Hi,

where should I give Culture="..." that ALL my pages have the same?
I dont want to paste it in every aspx file .

Thanks!

--
Best regards,
Odwrotnie.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmV2ZXJseW4=?=
Guest
Posts: n/a
 
      08-05-2006
This article will walk you through it:
http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

"odwrotnie" wrote:

> Hi,
>
> where should I give Culture="..." that ALL my pages have the same?
> I dont want to paste it in every aspx file .
>
> Thanks!
>
> --
> Best regards,
> Odwrotnie.
>

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=
Guest
Posts: n/a
 
      08-05-2006
First of all you have to override InitializeCulture as show in the article
with link posted by Neverlyn

But you need to do that for all pages, well I suggest that you made a class
name it BasePage or whatever, this class should inherit from
System.Web.UI.Page.
Override your InitializeCulture on it.
Now make all your pages inherits from BasePage, or the pages that really
need this feature.

This has lots of other benifits.

Regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications


"odwrotnie" wrote:

> Hi,
>
> where should I give Culture="..." that ALL my pages have the same?
> I dont want to paste it in every aspx file .
>
> Thanks!
>
> --
> Best regards,
> Odwrotnie.
>

 
Reply With Quote
 
=?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=
Guest
Posts: n/a
 
      08-05-2006
And of course you can set your default culture in web.config as well
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications


"odwrotnie" wrote:

> Hi,
>
> where should I give Culture="..." that ALL my pages have the same?
> I dont want to paste it in every aspx file .
>
> Thanks!
>
> --
> Best regards,
> Odwrotnie.
>

 
Reply With Quote
 
odwrotnie
Guest
Posts: n/a
 
      08-08-2006
On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
<(E-Mail Removed)> wrote:

> Now make all your pages inherits from BasePage, or the pages that really
> need this feature.


Could You please tell me how?

--
Best regards,
Odwrotnie.
 
Reply With Quote
 
=?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=
Guest
Posts: n/a
 
      08-08-2006
Create A BasePage Class
public class BasePage : System.Web.UI.Page
{
protected override void InitializeCulture()
{
//Method Implementation as mentioned in the article
}
}
You can also reveiw this article
http://www.c-sharpcorner.com/UploadF...b-1c68b05eb2e1

Now you have several pages, for example Products.aspx
now in your code behind make your Product Class inherits from BasePage as
the following:
public class Product: BasePage
{
//..normal coding
}

Also checkout this in your local MSD
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/76091f86-f967-4687-a40f-de87bd8cc9a0.htm

regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications


"odwrotnie" wrote:

> On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
> <(E-Mail Removed)> wrote:
>
> > Now make all your pages inherits from BasePage, or the pages that really
> > need this feature.

>
> Could You please tell me how?
>
> --
> Best regards,
> Odwrotnie.
>

 
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




Advertisments