Click here to Skip to main content
15,890,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: show or hide panel content without postback in asp.net 2003 Pin
N a v a n e e t h27-May-07 21:34
N a v a n e e t h27-May-07 21:34 
AnswerRe: show or hide panel content without postback in asp.net 2003 Pin
Christian Graus27-May-07 22:09
protectorChristian Graus27-May-07 22:09 
AnswerRe: show or hide panel content without postback in asp.net 2003 Pin
Sherin Iranimose27-May-07 22:47
Sherin Iranimose27-May-07 22:47 
GeneralRe: show or hide panel content without postback in asp.net 2003 Pin
N a v a n e e t h27-May-07 23:24
N a v a n e e t h27-May-07 23:24 
GeneralRe: show or hide panel content without postback in asp.net 2003 Pin
Sherin Iranimose27-May-07 23:26
Sherin Iranimose27-May-07 23:26 
Questionimage button click event Pin
harithadotnet27-May-07 20:54
harithadotnet27-May-07 20:54 
AnswerRe: image button click event Pin
Sherin Iranimose27-May-07 21:21
Sherin Iranimose27-May-07 21:21 
AnswerRe: image button click event Pin
Chetan Ranpariya27-May-07 21:38
Chetan Ranpariya27-May-07 21:38 
Hi,

Create a method with 2 arugments.
protected void img_Click ( object sender, ImageClickEventArgs e )
{
ImageButton img = ( ImageButton )sender;
Response.Write(img.ID + "
");
}

The above method will work as a handler for the click event of your dynamically generated imagebuttons.
To assign this event handler to the event of imagebuttons modify your for loop as following.

for (int i = 1; i < 11; i++)
{
img = new ImageButton();
img.ID = "img" +i.ToString();
img.ImageUrl="pg/1212/"+ i +".jpg";
img.Click += new ImageClickEventHandler( img_Click );
pl.Controls.Add(img); (pl is place holder control id)
}

I hope this will help you.



Thanks and Regards,
Chetan Ranpariya

QuestionMaster page problem Pin
Amr M. K.27-May-07 19:52
Amr M. K.27-May-07 19:52 
AnswerRe: Master page problem Pin
Sathesh Sakthivel27-May-07 19:56
Sathesh Sakthivel27-May-07 19:56 
AnswerRe: Master page problem Pin
Sherin Iranimose27-May-07 20:17
Sherin Iranimose27-May-07 20:17 
GeneralRe: Master page problem Pin
Amr M. K.28-May-07 2:29
Amr M. K.28-May-07 2:29 
GeneralRe: Master page problem Pin
Sherin Iranimose28-May-07 2:42
Sherin Iranimose28-May-07 2:42 
GeneralRe: Master page problem Pin
Sherin Iranimose28-May-07 2:50
Sherin Iranimose28-May-07 2:50 
GeneralRe: Master page problem Pin
Amr M. K.28-May-07 2:57
Amr M. K.28-May-07 2:57 
Questionhow to updata database Pin
sooreeagt27-May-07 19:28
sooreeagt27-May-07 19:28 
AnswerRe: how to updata database Pin
varshavmane27-May-07 20:20
varshavmane27-May-07 20:20 
QuestionError sending meeting request Pin
www.Developerof.NET27-May-07 19:06
www.Developerof.NET27-May-07 19:06 
Questionhow to upload an excel file and store it in database Pin
sooreeagt27-May-07 18:26
sooreeagt27-May-07 18:26 
AnswerRe: how to upload an excel file and store it in database Pin
Christian Graus27-May-07 18:49
protectorChristian Graus27-May-07 18:49 
QuestionRepetitive Rows of Controls Pin
freshonlineMax27-May-07 17:40
freshonlineMax27-May-07 17:40 
AnswerRe: Repetitive Rows of Controls Pin
Christian Graus27-May-07 18:13
protectorChristian Graus27-May-07 18:13 
GeneralRe: Repetitive Rows of Controls Pin
freshonlineMax27-May-07 19:55
freshonlineMax27-May-07 19:55 
GeneralRe: Repetitive Rows of Controls Pin
Sandeep Akhare27-May-07 20:06
Sandeep Akhare27-May-07 20:06 
GeneralRe: Repetitive Rows of Controls Pin
Sathesh Sakthivel27-May-07 20:06
Sathesh Sakthivel27-May-07 20:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.