使用后端代码添加Ajax控件 [英] Add Ajax Control using backend code

查看:66
本文介绍了使用后端代码添加Ajax控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i创建了一个带有一个文本框的网页。

当我点击文本框时,将显示日历。

为此textbox我不是从添加扩展程序选项添加日历扩展程序

- >我要求你通过代码添加扩展程序,



怎么样可能

Hi,
i have create a web page with one textbox.
When i click on textbox calender will display.
And for that textbox i am not add calender extender from add extender option
-->i require yo add that extender through code ,

How it possible

推荐答案

转到网页的Page_Load事件。创建CalanderExtender的对象,并将该扩展程序对象的TargetControlID设置为文本框。试试这个:

Go to the Page_Load event of webpage. Create an object of CalanderExtender and set the TargetControlID of that extender object to your textbox. Try this:
CalanderExtender  ce= new CalanderExtender();
ce. TargetControlID = TextBox1.ClientID;







--Amit




--Amit


这篇关于使用后端代码添加Ajax控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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