|
Gosh - see, this is the sort of info we need if we can help you.
The issue seems obvious to me, how are you confused ? c:\\..\89ANC7EF\whatever, is not a valid path. The .. IS valid, but as a step up the tree. You need to fix your code so that you store full paths to the files.
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 )
|
|
|
|
|
Thx for the link regarding how to use Google properly.I really neaded it
|
|
|
|
|
I also think it is sometimes better to store just the file location in the database rather then the entire file.
If you put lots of files in the database it tends to swell up quite quickly.
|
|
|
|
|
i need to embedd images in my email.i want that on clicking a button i get n number of dynamic fileupload controls.that i have done.now i want to upload images thru them.and i want to embedd these images in my mail and send them to number of people.all i want to ask is how can others access the images that are on my system only?
one more thing---how do i count the number of images in the content of my email?i have the regular expression for images,but how to use them to count the images?
|
|
|
|
|
Varun123 wrote: how can others access the images that are on my system only?
They can't. The end. You need to host them on the web, or investigate if there's a way to pass them as attachments, and some mail readers may be able to read them from there.
Varun123 wrote: how do i count the number of images in the content of my email?
They would be img tags and assuming that the mail reader read HTML mail. So, a regex seems the way to go.
This question also is not really about ASP.NET.
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 )
|
|
|
|
|
<%# %> <%$ %> <%= %> Where can i find more info about these instructions?
Ive tried google, but it gives no results, i think it must be interpreting <%=$> as special chars
Ive used them in bindings but i dont really know the difference
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
Googling that will be hard, b/c you can't tell google easily to return the terms.
I believe that # makes it a databinding statement, so it needs to be inside a databound control. = means it's going to return a string, I think. I've never seen the $ one.
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 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.
|
|
|
|