Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,I take one gridview and bind it.It has image also.
It bind properly. Gridview also has link kbutton. On click of link button it takes the selected rows value and assign it to textboxes. I also want to assign image which is now in gridview to image box. The textbox assigned value properly but not image.
Can anyone help me. How to get image from gridview.
Thank you

Here is my code
<asp:Image ID="ImgModel" runat="server" BorderColor="Black" BorderWidth="2"
                               style="height:120px;border-width:1px;" />

if (e.CommandName.Equals("selectRecord"))
           {
               MultiView1.SetActiveView(ViewAdd);
               GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
               tbxModelCodeAdd.Text = row.Cells[1].Text;
               ddlJobType.SelectedItem.Text = row.Cells[2].Text;
               ImgModel.ImageUrl =("../images/")+row.Cells[3].Text;
               lblHidden.Text = id.ToString();


           }
Posted
Updated 2-Nov-15 21:49pm
v2

 
Share this answer
 
Comments
asplover1 3-Nov-15 3:56am    
Thanx for reply.Can you please give me some other hint. The video takes lost of time in my system
Use Image Field control .text box will not work
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900