private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Label1.Text="6666666666dddd";
}
这里对Label1是无法赋值。请问该怎么来做。才能对Label1赋值
{
Label1.Text="6666666666dddd";
}
这里对Label1是无法赋值。请问该怎么来做。才能对Label1赋值
解决方案 »
- ibatisnet1.0版本,insert 语句问题,
- DATAGridview 中增加CHECKBOX
- 怎样把textBox的值添加到datagrid的某列的行
- 用什么方法可以实现在本机的多个应用程序间共享一个组件???
- 200分求一个非技术的关于Developer Express控件的问题,顶者有分.100分送顶贴人,100分送答题人.
- socket编程!!!
- very easy的问题,所以给分比较少
- SilverLight 中关于 ASCII码转换问题
- 在Win98中,Crystal Report的报表显示不出来,各位大侠帮帮忙.
- 对文件进行读写操作时,如何指定读、写文件的某一行???
- 做安装包时,想设置指定目录的权限,如何做?
- 如何通过控件基类Control知道它指的是哪种子类控件?
把你的timer的定义贴出来statusTimer.Tick += new EventHandler(statusTimer_Tick);
statusTimer.Interval = 50;
statusTimer.Enabled = true;
statusTimer.Start();private void statusTimer_Tick(object sender, System.EventArgs e)
{
Label1.Text="6666666666dddd";
}
用js
SetTimeOut( 100 , myfunc );
function myfunc()
{
document.Form1.TextBox1.value = "set";
}
<SCRIPT>
function fnHide(oToHide){
window.setTimeout("fnHide2(" + oToHide.id + ")", 3000);
}
function fnHide2(sID){
var o = eval(sID);
o.style.display="none";
}
</SCRIPT>
<INPUT TYPE=button VALUE="Count Down"
ID="oHideButton" onclick="fnHide(this)">
function fnHide()
{
window.setTimeout("myfunc", 100);
}
function myfunc()
{
Form1.TextBox1.value = "set";}
</SCRIPT><asp:TextBox id="TextBox1" runat="server"></asp:TextBox><INPUT id="oHideButton" onclick="fnHide()" type="button" value="Count Down">我是这样写的,没提示有错误,可是,点击Count Down,以后TextBox1没有显示
郁闷
是不是,没找到TextBox1这个控件
要运行c#代码,必须要客户端发出http请求,服务器端得到请求后才能运行,你可以看看asp.net在客户端的代码就知道一般asp.net会自动加一些诸如到你的页面上
__doPostBack(..)或者 <input type=submit
所以要在客户端调用的话,必须通过请求,
最好用ajax