运行时单击按钮的问题 [英] problem in clicking button in runtime
问题描述
hiii全部
我有一个图像按钮,我在运行时使用它的数据绘制图像,并且要在事件发生时单击它,出现弹出式模型以确认删除或更新该行.
问题是被调查者,我进行了很多搜索,但发现的全部是在设计时...
有人可以帮我吗,请见eeeeeeeeeee?
感谢
hiii all
i have an image button that i draw with its data in the runtime and i want in the event og onclick of it, apopup model appears to confirm delete or update that row.
the problem is hereeeee that i made alot of searches but all i found was in the design time...
can any one help me , pleaseeeeeeeeeeee?
thanks
推荐答案
protected void Page_Load(object sender, EventArgs e)
{
//create image button
ImageButton myImageButton = new ImageButton();
myImageButton.ImageUrl = "myPicture.png";
//set the click event - this event will be fired when the user clicks the image button
myImageButton.Click += new ImageClickEventHandler(myImageButton_Click);
}
void myImageButton_Click(object sender, ImageClickEventArgs e)
{
//your image button was clicked.
}
关于弹出窗口,您正在使用javascript吗?如果是这样,请记住该消息框只能包含确定"或取消".您可以通过显示带有所需问题和相应按钮的div,通过c#代码进行操作.
Regarding the popup, are you doing it in javascript? If so, remember that the message box could only contain "OK" or "Cancel". You can do it through c# code by showing a div with the required question and respective buttons.
这篇关于运行时单击按钮的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!