Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 8th, 2007, 07:17 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default meta:resource key in skin file

Hi

I am using meta:resource key in skin file but it is not working .. can any one help me..

thanks in advance


  #2 (permalink)  
Old August 8th, 2007, 08:23 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you be more specific? Perhaps post the code in question.
  #3 (permalink)  
Old August 9th, 2007, 01:39 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks for reply..
scenario is .

1. I have a label in default.aspx page-as
  <asp:Label runat="server" ID="_hell" ></asp:Label>

2.setting of this label are defined in my skin file as-

<asp:Label runat="server" meta:resourcekey="_hellResource1" BackColor="Beige"></asp:Label>

3.I am using two local resource files to get the value of this label at runtime according to language setting.

    a.Default.aspx.resx
            _hellResource1.Text=bye;

    b.Default.aspx.el.resx
            _hellResource1.Text=Hi;

I was thinking that at run time my default.aspx will use my skin class label and from there will get meta:resourcekey and thus according to meta:resourcekey the text of label would come.. But this is not happening.

skin file is not supporting meta:resourcekey attribute.

plz help me why this is not happening or if you could tell me any alternative for it.

A lot of Thanks in advance.

Bye.
Plz


  #4 (permalink)  
Old August 9th, 2007, 02:15 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by planoie
 Can you be more specific? Perhaps post the code in question.

Hi,

Thanks for reply..
scenario is .

1. I have a label in default.aspx page-as
  <asp:Label runat="server" ID="_hell" ></asp:Label>

2.setting of this label are defined in my skin file as-

<asp:Label runat="server" meta:resourcekey="_hellResource1" BackColor="Beige"></asp:Label>

3.I am using two local resource files to get the value of this label at runtime according to language setting.

    a.Default.aspx.resx
            _hellResource1.Text=bye;

    b.Default.aspx.el.resx
            _hellResource1.Text=Hi;

I was thinking that at run time my default.aspx will use my skin class label and from there will get meta:resourcekey and thus according to meta:resourcekey the text of label would come.. But this is not happening.

skin file is not supporting meta:resourcekey attribute.

plz help me why this is not happening or if you could tell me any alternative for it.

A lot of Thanks in advance.

Bye.
Plz


  #5 (permalink)  
Old August 9th, 2007, 08:37 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not an expert on skins, just started using them myself. But I suppose the problem is that you are supposed to define instance specific type information for controls in the skin.

If what you were trying worked, then EVERY label in your application would have the same text. Is this what you are looking to achieve?

Use the skin to set generic properties, like style attributes but leave the specifics up to the individual instances. You want to create the same label that is used in many places that you would need to apply many of the same instance property values to, create a user control. They are there for just this purpose.

-Peter
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Title , Meta Keyword , Meta Description dynamic shaileshk ASP.NET 1.x and 2.0 Application Design 8 August 21st, 2007 01:10 AM
warning from dotted notation in resource key Linden BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 19th, 2007 03:58 PM
Resource File kk_kumar99 Beginning VB 6 3 October 23rd, 2006 04:32 AM
help help! meta file error! yokel BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 6th, 2004 12:26 AM



All times are GMT -4. The time now is 10:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.