|
Thanks for the reply
About the $
Ive seen it when you bind a property in a control to a resourcekey:
Text="<%$ Resources:Resource, tttProduct_aspx_txtComent %>"
Do you know of any links where a can find more info about them?
Thanks again
Alexei Rodriguez
|
|
|
|
|
Cool - I didn't know that.
To be honest, I'm sure MSDN covers them, but I googled before responding and didn't find much, either.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
AlexeiXX3 wrote: About the $
Ive seen it when you bind a property in a control to a resourcekey:
or a connection string (ie within a SqlDataSource)
ConnectionString="<%$ ConnectionStrings:myConnString %>"
|
|
|
|
|
I have a textbox:
<asp:TextBox ID="TextBox1" runat="server" Text="<%$ Resources:Resource, tttProduct_aspx_txtComent %>"></asp:TextBox>
It works, but what i need is to embed the resource value to the mouseover, ive tried:
<asp:TextBox ID="TextBox1" runat="server" onmouseover='<% "Tip('" & resources.Resource.tttProduct_aspx_txtComent & "');" %>'
Text="OK"></asp:TextBox>
In order for the Tip function to work, it should have the format:
onmouseover="Tip('String to show');"
I need to replace String to show with the value on my resource key
How can i accomplish that??
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
You have a code behind method called tip that returns a string ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply
No, Tip is a javascript method
This is the way it works:
<asp:TextBox ID="UserName" runat="server" AutoPostBack="True" onmouseover="Tip('Text to show');" Width="150px"></asp:TextBox>
I want to replace "Text to show" with the value from my resourcekey
Alexei Rodriguez
|
|
|
|
|
That's what I thought. You need to put the resource key in the <% block, but not the 'tip' part, otherwise it tries to call tip in the code behind, instead of passing the function call through to the browser.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You need to put the resource key in the <% block, but not the 'tip' part
Nope, I cant make it work
Ive tried leaving the "Tip('" and "');" outside the <% but it doesnt work
It looks like i cant mix strings and resource keys in the same assignment
This works if i set the value in my resourcekey to "Tip('Text to show')"
<asp:TextBox ID="TextBox1" runat="server" onmouseover="<%$ Resources:Resource, tttProduct_aspx_txtComent %>"></asp:TextBox> But i wouldnt like to add the whole syntax (Tip('Text');) in the resource file
If i want to leave the "Tip('" and "');" outside my resourcefile and put it all together in my html source, how would it be (If it is possible)?
By the way
What do you think about storing tooltips in a resource file??
Will this be something optimal or will it consume many resources when running the page?
Thanks again
Alexei Rodriguez
|
|
|
|
|
The most straightforward way is to use <%= and then call a method in the code behind which returns the whole string, including the tip part and the resource.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks again
This code:
<asp:TextBox ID="TextBox1" runat="server" Text="<%= FunctionThatReturnsString() %>"></asp:TextBox>
or
<asp:TextBox ID="TextBox1" runat="server" Text='<%= FunctionThatReturnsString() %>'></asp:TextBox>
Outputs the following html:
<input name="TextBox1" type="text" value="<%= FunctionThatReturnsString() %>" id="TextBox1" />
I was reading this: http://jblack.wordpress.com/2006/12/15/server-tags-cannot-contain-constructs/[^]
Alexei Rodriguez
|
|
|
|
|
OK, in that case, I guess you need to add the attribute and do it that way. That DOES suck...
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: That DOES suck...
Yes it DOES
Ill store in my resource file the whole thing "Tip('Text to show');"
By the way...What do you think of using resourcefiles to store tooltips
My app wont need several languages, im just doing it to keep tooltips in one place
But will this impact my app performance??
Thanks for your help
Alexei Rodriguez
|
|
|
|
|
I doubt it will have a major performance impact, and I think factoring out strings is a good practice, I wish I did it more.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, I have a VERY URGENT question on C# in ASP.NET. I am building an ASP.NET WEB application.
Does anyone know how to retreive BINARY image from a SQL Server 2005 Express Database and DISPLAY it on a Datagrid control?
I can manage to retreive the Binary Data, but I have absolutely no idea how it can be placed into the dataset, or accessed via the Databinder.
I can only display regular string data onto a Datagrid Control. This is my method in displaying string data onto a Datagrid:
1. From the Codebehind, I connect to the database.
2. I then use a DATASET and store the retreived data
3. In the HTML page, I use the Databinder to load the data (<%# DataBinder.Eval(Container.DataItem,"NAMEOFDATABASECOLUMN") %>
However this method only works for strings, I need to display Binary Image, can anyone help me?
Thank you!!!
|
|
|
|
|
Infernojericho wrote: I have a VERY URGENT question
So, totally different from all the others ?
Infernojericho wrote: Does anyone know how to retreive BINARY image from a SQL Server 2005 Express Database and DISPLAY it on a Datagrid control?
Yes, you need to write a http handler, and have your images link through that. your problem is that an img tag requires a link to the image itself. So, you need to write a http handler that returns that image data, and then your databinding creates the link that that page, with an id that is used to seperately download the image. This means a lot of database hits, a better bet for a high load site is to put the images on your file system and store the path to them in yuor database.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian, thanks for your reply (again).
I am afraid I am not very good in ASP.NET (I think you can tell that already), and I am quite lost.
Do you happen to know any sites on the web with similar examples?
Many thanks again.
|
|
|
|
|
I think this[^] does what I mean.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, Christian. Greatly appreciated. I'll take a look at it right now.
|
|
|
|
|
Sorry, but one last thing, I see that the example you provided is using VS.NET 2005, should I be worried if I am using VS.NET 2003? Thanks!!!
|
|
|
|
|
That would mean that you can't use the project provided, but the overall concept will be the same.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Alright, many thanks again for the assist.
|
|
|
|
|
Hello friends,
In my app i have to use a messagebox like javascript alert.
I found some code on net in C# to create a messagebox but it is not working in my applicatio as i am using UpdatePanel in it.
That code is working when used in separate without Updatepanel.....
It is generating some parsing error and gives it in a alert.
I am unable to find its solution. Please help me.......
Deepak Nigam
|
|
|
|
|
Deepak Nigam wrote: In my app i have to use a messagebox like javascript alert.
It's not LIKE a javascript alert, a javascript alert is your only option in ASP.NET.
Deepak Nigam wrote: Please help me.......
Well, step one is to fix the code so you don't get the parsing error. If you told us the actual error message and gave us the code you're using, perhaps we could help more.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how i can develope e-forum application using c# it's urjant required so help me..
|
|
|
|
|