如何在运行时中创建按钮并编写事件 [英] How to create a button in runtime and write it's events

查看:66
本文介绍了如何在运行时中创建按钮并编写事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个调查站点,我想显示一个问题,并逐个选择一个按钮.单击选择的答案之一后,单击按钮以将答案插入数据库.如何在运行时加载按钮并编写Button的事件以执行?我是Asp.net的初学者.请告诉我该怎么办?非常感谢.

I got a survey site , I want to display a question and it''s choices one by one and a button. After I click one of choice to answer, Click the button to insert answer into database. How can I load the button in runtime and write Button''s events to execute ? I''m a beginner in Asp.net .Please tell me how can I do ? Thanks a lot.

推荐答案


您可以使用按钮类动态创建按钮,该按钮可用的按钮与普通按钮可用的事件相同.
谢谢与问候,
流行
Hi,
You can use button class to create a button dynamicallyand available to that button are same as the events available for normal button.
Thanks & Regards,
Prasant


这篇关于如何在运行时中创建按钮并编写事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆