|
Ok fine. Now go home open the codeproject and click on the link.
U are there so u can access yr localhost but we (other) cant do that...
Thanks,
Sun Rays
Rate this post if you like answer.
|
|
|
|
|
OK - to reiterate what I've said before: read your book. Giving me a link to your local machine won't work, localhost on my machine is MY file system. Not yours.
Christian Graus - Microsoft MVP - C++
"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 , sorry for all the misunderstanding , actually the thing is , the link belongs to the sample , which i explored on the net.it's not my pogram link
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: this is the sort of thing i wanted to do
this sort of thing you can do only in your system.
Regards - J O H N -
<- Life is not measured by the number of breaths we take, but by the moments that take our breath away. ->
|
|
|
|
|
|
Have you any idea about DataRelation?
If yes follow following code
DataSet ds=
DataRelation dr = new DataRelation("new_relation",ds.Tables[0].Columns["PKey"],dst.Tables[1].Columns["Pkey"]);
ds.Relations.Add(dr);
parentGridView.DataSource=ds.Table[1];
parentGridView.DataBind();
Now onRowDataBound event of parent gridview
GridView rp = (GridView)(e.Row.FindControl("ChildGridViewID"));
rp.DataSource=((DataRowView)(e.Row.DataItem)).CreateChildView("new_relation");
rp.DataBind();
bEst regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thank Sir
Let's try the code.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
hi frns
i have developed one application in that i have one gridview in that i have one column (filename)with hyperlink when i click on that link i am getting the filedownload window asking to save or open but i want the file to be displayed directly instead of asking in the browser.
any suggestions grately appreciated
regards
sunilwise
-- modified at 4:35 Thursday 15th November, 2007
|
|
|
|
|
Link to a page which takes the filename off the URL and does a Response.BinaryWrite to send the file into the browser to be displayed.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
its working in local system but if i try to open it in another system which is connected through lan again that filedownload window is opening sir
|
|
|
|
|
This is a sure sign that your overall design is broken, because it's working when your code can assume that the client is the server.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
If you are using Response.AppendHearder("Content-Disposition"........) remove it, it will be open in same window and will not give you any popup. Add all the content to Response.BinaryWrite(byte[],offset,count);
|
|
|
|
|
Mr.Prateek G could u please tell me how to use Response.BinaryWrite method what are the values i have to give for the attributes byte, offset and count
i have never used this Response.BinaryWrite method
i am getting only the path and filename
|
|
|
|
|
Try this
string sourceFile = "C:\\Documents and Settings\\PrateekGupta\\Desktop\\pref.xml";
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/octet-stream";
FileInputStream filIpStrm = null;
MemoryStream ms = new MemoryStream();
filIpStrm = new FileInputStream(sourceFile);
sbyte[] buffer = new sbyte[1024];
int len = 0;
while ((len = filIpStrm.read(buffer)) >= 0)
{
byte[] bbuffer = new byte[1024];
System.Buffer.BlockCopy(buffer,0,bbuffer,0,1024);
ms.Write(bbuffer,0,1024);
}
Response.OutputStream.Write(ms.ToArray(), 0, Convert.ToInt32(ms.Length));
filIpStrm.close();
Response.End();
let me know if it will work for u...
|
|
|
|
|
Hi,
I want to uploading a image and retrive, i uploaded but in database its storing like binary data, so iam not getting my image in output. Iam using mssql.
Can u pls help me
krishna
krishna
|
|
|
|
|
OK, you have a few problems here
1 - binary data is how you want to store it, you just need to turn that data back into an image, which you do by putting it into a memory stream and building an Image out of that.
2 - because you're using ASP.NET, any images you store in the database can only be served inside a page if you feed them out through a HTTPhandler. A far easier approach is to store the images in your file system and store the path to them in SQL Server.
Christian Graus - Microsoft MVP - C++
"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 ASP.NET application in which i am showing some reports in pdf format. Application is login based some have rigths to see the report while some don't. Problem is whenever someone opens reports they are getting stored in Client Temporary folder. Any solution. I cannot change client setting.
I have asked another question in ADO.NET forum, if anyone can give answer to that one too. Here is the link
http://www.codeproject.com/script/comments/forums.asp?forumid=1725&noise=1&mpp=50&select=2319646#xx2319646xx[^] Last modified: 60mins after originally posted --
Regards
Shajeel
|
|
|
|
|
I want to call my web application logout page on window close.what code should I write in javascript.
|
|
|
|
|
You can't, the window is going to close before the redirect occurs. The only way to get a message to the server when the window closes is to use AJAX.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
in body tag add the onbeforeunload function
funciton abc()<br />
{<br />
if(confirm('navigate to logout'))<br />
{<br />
location.href('logout.aspx');<br />
return false;<br />
}<br />
<br />
}
Hope this will help u.
-- modified at 3:52 Thursday 15th November, 2007
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Iam want to store image in mssql db, i stored its storing like <binary data="">
can u give solution for this
krishna
|
|
|
|
|
storing like Binary data
krishna
|
|
|
|
|
Funny enough, the first google hit for 'SQL Server Image' is an artice on this site.
http://www.codeproject.com/useritems/imaging.asp[^]
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Can u pls give the code in mssql....
krishna
|
|
|
|
|
krishnavaradharajan wrote: mssql....
MSSQL ? It stores the image as byte format. Choose image datatype.
|
|
|
|