|
It's pretty easy
<asp:Repeater id="rp1" runat="server">
<itemtemplate>
<asp:Repeater id="rpChild" runat="server">
<itemtemplate>
</itemtemplate>
</asp:Repeater>
</itemtemplate>
</asp:Repeater> On first repeater's databind event you can find the child repeater(rpChild here) and bind the second table to there. Check this KB article[^] which explains this.
|
|
|
|
|
Thanks brother,but the second repeater will bind data in tabular format,but i have to display the data of second repeater into labels. I have near about 21 labels.So I am not getting . Do you have code for binding with labels.
Thanks
|
|
|
|
|
Hi,
How can I know the language of the Outlook File (".PST") ? I know by default it is English US, but if it made up in any other language and I want to Process that file, than how can I know the language of ".PST" file?
Thanks
|
|
|
|
|
What this has to do with ASP.NET ? And I don't think that you can find the language used in PST files. Here is a KB article[^] which shows how to create PST files, take a look at that.
|
|
|
|
|
I am working in Outlook based application from one year. I know how to create PST file, but I want to know the language of a PST file which is created by any other person. Like I am from one country and I have set language English-US and crate a PST but some one from other country create a PST with some different language (If he is Korian person, set language Korian) and I want to process that PST file than how can I know language (here language is Korian) of that PST.
|
|
|
|
|
pjc* wrote: I know how to create PST file, but I want to know the language of a PST file which is created by any other person. Like I am from one country and I have set language English-US and crate a PST but some one from other country create a PST with some different language (If he is Korian person, set language Korian) and I want to process that PST file than how can I know language
If you know the structure of a PST file, you should know how it is keeping the language information, right ? If you know how it stores it, reading that won't be a big deal.
|
|
|
|
|
I am having an application in which i am supposed to stored a word document in data base and on a click event we should be able to see the word doc as a word file.
I was successful in storing the word document in data base. In the table the datatype is of image,and i have stored it in word formate.
But i am unable to retrieve it.
the codes i have used is as below.
if(fileUpload.PostedFile != null)
{
intDocLen = fileUpload.PostedFile.ContentLength;
byte[] Docbuffer = new byte[intDocLen];
Stream objStream;
objStream = fileUpload.PostedFile.InputStream;
objStream.Read(Docbuffer,0,intDocLen);
string query="insert into hr_resume1(can_name,age,resume)values('"+txt_name.Text+"','"+txt_age.Text+"','"+Docbuffer+"')";
Obj_db_con.ExecuteQry(query);
}
and for getting it back from the database i have used the code.
if(e.CommandName=="view")
{
//Session["job_id"]=e.Item.Cells[0].Text;
string c_id=e.Item.Cells[0].Text;
string query2="select resume from hr_resume where cand_id='"+c_id+"'";
SqlDataAdapter da = new SqlDataAdapter(query2,con);
DataSet ds = new DataSet();
da.Fill(ds);
Response.ContentType = "appliaction/msword";
// Remove the charset from the Content-Type header.
Response.AppendHeader("content-disposition", "attachment;filename=FileName.doc");
Response.Charset = "";
// Turn off the view state.
this.EnableViewState = false;
StringWriter tw = new System.IO.StringWriter();
HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
// Get the HTML for the control.
RenderControl(hw);
//Write the HTML back to the browser.
Response.Write(tw.ToString());
// End the response.
Response.End();
}
But i am not able to see the file.
|
|
|
|
|
Be more specific. Can you download it ? Is the file you download garbage, or does the download not occur ?
Cuckoo wrote: Response.ContentType = "appliaction/msword";
If you spell this right, it's more likely to work.
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 )
|
|
|
|
|
i dont know exactly whether it is being downloaded.
i am getting this error.
This file could not be found.
Try one or more of the following:
*Check the spelling of the name of the document.
*Try a different file name.
(c:\...\89ANC7EF\FileNmae[1].doc).
please help
|
|
|
|
|
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 )
|
|
|
|