Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 03, 2011 04:23 PM by olivespike
Member
176 Points
63 Posts
Nov 03, 2011 02:26 AM|LINK
Hello. Given the following aspx page named Test1.aspx:
<asp:Button ID="Button1" runat="server" Text="ASP Button" meta:resourcekey="Button1Resource1" />
<input id="Button2" type="button" value="HTML Button" runat="server" meta:resourcekey="Button2Resource2" />
... and a resource file named Test1.aspx.resx which contains the following Name and Value pairs:
Button1Resource1.Text - ASP Button
Button1Resource1.ToolTip - ASP Button ToolTip
Button2Resource2.Text - HTML Button
Button2Resource2.ToolTip - HTML Button ToolTip
PageResource1.Title - Test Page
Why will the HTML Controls not display the tooltip text when the page is compiled and run?
Thank You!
Contributor
3643 Points
844 Posts
Nov 03, 2011 07:21 AM|LINK
Hey there
if you are using html controls then you need to add runat="server" to controls if you want to use resource file's key on html control
hope it works for you
Nov 03, 2011 04:23 PM|LINK
Thank you for the suggestion; but as line 3 indicates in my original post I do have the runat=server attribute set.
olivespike
Member
176 Points
63 Posts
Resource File, HTML Controls and .NET Controls
Nov 03, 2011 02:26 AM|LINK
Hello. Given the following aspx page named Test1.aspx:
<asp:Button ID="Button1" runat="server" Text="ASP Button" meta:resourcekey="Button1Resource1" />
<input id="Button2" type="button" value="HTML Button" runat="server" meta:resourcekey="Button2Resource2" />
... and a resource file named Test1.aspx.resx which contains the following Name and Value pairs:
Button1Resource1.Text - ASP Button
Button1Resource1.ToolTip - ASP Button ToolTip
Button2Resource2.Text - HTML Button
Button2Resource2.ToolTip - HTML Button ToolTip
PageResource1.Title - Test Page
Why will the HTML Controls not display the tooltip text when the page is compiled and run?
Thank You!
mayankpathak...
Contributor
3643 Points
844 Posts
Re: Resource File, HTML Controls and .NET Controls
Nov 03, 2011 07:21 AM|LINK
Hey there
if you are using html controls then you need to add runat="server" to controls if you want to use resource file's key on html control
hope it works for you
mayankpathak...
Contributor
3643 Points
844 Posts
Re: Resource File, HTML Controls and .NET Controls
Nov 03, 2011 07:21 AM|LINK
Hey there
if you are using html controls then you need to add runat="server" to controls if you want to use resource file's key on html control
hope it works for you
olivespike
Member
176 Points
63 Posts
Re: Resource File, HTML Controls and .NET Controls
Nov 03, 2011 04:23 PM|LINK
Thank you for the suggestion; but as line 3 indicates in my original post I do have the runat=server attribute set.