Hi i want to send url with hash of image source.How can do it ?
Code :
Image img_ = new Image();
img_.ImageUrl = "ShowImageInRuntime.aspx?FileName=C://Images//Image.jpg";
i dont want to see my local path in page.Thx for your help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need either perform encryption of the path and base 64 encode before sending and do the reverse in the handler.
Other option is to maintain a mapping XML where the XML would contain the path and corresponding identifier. In your application get the node with the path and pick the id and send append it to url. In the handler do the reverse to fetch the path.
UPDATE : Adding Sample code
XML file with GUID as ID and corresponding fileName. by using guid, people cannot guess the random ids easily.
Using LINQ to XML