I am trying to implement functionality for an image thumbnail within a gridview whereby I can view it full size in a new browser window using the example at :
http://odetocode.com/articles/172.aspx
In the last part of the article there is an instruction to pass an additional parameter in the query string so that you view the full size of the image when it opens in new browser window. How do I implement this functionality? I understand that the additional parameter should refer to source below as outlined in the article.
<ItemTemplate >
<a href='<%# "getImage.aspx?ThumbNail=\"N\"&ID=" + DataBinder.Eval(Container.DataItem,
"ImageIdentity") %>'>
<img runat="server" src='<%# "getImage.aspx?ID=" + DataBinder.Eval
(Container.DataItem, "ImageIdentity")%>' ID="Img1"/>
</a>
</ItemTemplate>
I want to know how i can pass the additional parameter to the snippet below in the getImage.aspx page
System.Data.SqlClient.SqlDataReader Reader=null;
string ImageIdentity = Request.QueryString["ID"].ToString();
SqlConnection sqlConnection = new SqlConnection(@"initial catalog=Articles;user
id=sa;password=;server=myServer");
sqlConnection.Open();
SqlCommand sqlCommand = new SqlCommand("Select Images,ImageType from Images where
imageKey="+ImageIdentity ,sqlConnection);
Reader= sqlCommand.ExecuteReader(CommandBehavior.CloseConnection);
Reader.Read();
What I have tried:
I have tried something of this order:
con = New SqlConnection(ConfigurationManager.ConnectionStrings("Constring").ConnectionString)
If Not IsPostBack Then
Dim docID = Request.QueryString("id")
Dim docIDapp = Request.QueryString("idapp")
If Request.QueryString("id") <> "" Then
cmd = New SqlCommand("Select * from ONLINELOANS where id = '" & docID & "'", con)
End If
If Request.QueryString("idapp") <> "" Then
cmd = New SqlCommand("Select * from ONLINELOANS where id = '" & docID & "'", con)