Hi all
I am looking for code that will prevent the user from clicking on a particular button more than once. I got some C# code that is suppose to work. I converted this code into vb.net:
The problem that I am getting is: "Value of type System.Web.UI.WebControl.Button cannot be converted into System.Web.UI.PostBackOptions". I am using the .net 2005 professional environment. Am suggestions for this problem?
Mike55.
I am looking for code that will prevent the user from clicking on a particular button more than once. I got some C# code that is suppose to work. I converted this code into vb.net:
Code:
Dim sb As New System.Text.StringBuilder
sb.Append("if (typeof(Page_ClientValidate) == function) { ")
sb.Append("if (Page_ClientValidate() == false) { return false; }} ")
sb.Append("this.value = Please wait...;")
sb.Append("this.disabled = true;")
sb.Append(ClientScript.GetPostBackEventReference(Button1))
sb.Append(";")
Button1.Attributes.Add("onclick", sb.ToString())
The problem that I am getting is: "Value of type System.Web.UI.WebControl.Button cannot be converted into System.Web.UI.PostBackOptions". I am using the .net 2005 professional environment. Am suggestions for this problem?
Mike55.