Friday, January 28, 2011

Asp.net Query string how To Transfer File Location

Following Code will help, who want transfer FileLocation
Like (C:\\manikandan\\resume.doc) one page To another page Using Querystring


Sample Code:=
=============

Parent Page:

String fileFullPath=Server.UrlEncode(C:\\manikandan\\resume.doc);
Response.Redirect(..\Sample.aspx?Loc=fileFullPath);



Child Page:
=============

string FileLocation = string.Empty;

if (!string.IsNullOrEmpty(Server.UrlDecode(Request.QueryString["Loc"].ToString())))
{
FileLocation = Request.QueryString["Loc"].ToString();
}

Thanks ,Happy Coding

No comments: