用linkbutton实现验证码控件的刷新,该怎么做?

解决方案 »

  1.   

    <img id="Img1" alt="看不清,请点击我!" onclick="this.src=this.src+'?'" src="CheckCode.aspx"
           style="width: 73px; height: 22px" align="left" />能看懂这句代码的意思不?
      

  2.   

    onclick="this.src=this.src+'?'" src="CheckCode.aspx"
    不是很懂
      

  3.   

    我是这样实现的
    <script type="text/javascript">$('checkcode').src = 'checkcode.aspx?update=' + Math.random()</script><img src ="checkcode.aspx"  onclick="this.src='checkcode.aspx?update=' + Math.random()" alt="看不清,请点击我"/>
      

  4.   

    当你请求同一个页面的时候,微软不会帮你刷新,他认为是postback操作
    只要CheckCode.aspx加个随机的参数,他才帮你刷新
    类似这种:
    "CheckCode.aspx?"+Random.Next(1,10000);只加问号我没试过,不知道行不
      

  5.   

    呵呵,看不懂你可以alert试试就知道这个src会什么样。。他是个循环累积。。
      

  6.   

    <a title="刷新验证码" href="#" onclick="javascript:document.getElementById('Image1').src='CheckCode1.aspx?id='+Math.random();return false;">看不清,换张图片 </a>
      

  7.   

    <img id="Img1" alt="看不清,请点击我!" onclick="this.src=this.src+'?'" src="CheckCode.aspx"
    style="width: 73px; height: 22px" align="left" />可以的,用一次就知道了
      

  8.   

    linkbutton 的 Create();方法就是创建验证码的方法,你重新创建一个不就是刷新了吗?