How to give the Request.Querystring value to ImageURL in .net?

NoNaMe

New Member
I have many hyperlinks in my Page. If i click on a hyperlink it will take me to the respective page. I have given \[code\]Request.QueryString\[/code\] value with the hyperlinks.Now i want to give that \[code\]Request.QueryString\[/code\] value as my ImageURLI have given like \[code\]<asp:Image ID="NewsImage" runat="server" ImageUrl='<%# GetImageURL() %>' Width="100px" Height="100px" />\[/code\]Then in the coding side i have given like \[code\]public string GetImageURL() { string imagename = Request.QueryString["News"] as string; return "~/Images/" + imagename; }\[/code\]But I am not getting the image in my output..
When i give \[code\]<asp:ImageButton\[/code\] instead of \[code\]< asp:Image\[/code\] then i am getting a error like Submit Query in the place where i have placed my ImageButton.
 
Back
Top