Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear sir,
how can i get the id(seat _id)from table (table name=seatselection)and bind that id to image_Button...
plz help...
Posted

In your
Page_Load()
you can setup the ID of the button from the C# code:
//Load your id from your DB table, and then
image_Button.ID= id; 
 
Share this answer
 
v2
First add a Image button to your application and pass the url of Image in it like this:

<asp:ImageButton Width="200px" Height="50px" ID="img" ImageUrl="~/Anubhav Chaudhary.jpg" runat="server" OnClick="img_Click" />


Now go to your aspx.cs file and writ on the click of this Image button like this:

C#
protected void img_Click(object sender, ImageClickEventArgs e)
{

}


As you had done the coding on normal button, similar coding will be done here also. Firstly add Namespace for SQL/Oracle/Access/Excel etc. now add the Connection, Command, Adaptar, reader or whatever you need and just provide the coding in the click of this Image button.
 
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