Validation Summary.ShowMessageBox ???
-
Suppose that i have a validation summary on my web forms with showmessagebox and showsummary is set to true, a button and a custom validator. While coding the onclick i set IsValid property of that custom validator to false and return the function. Why the validation summary just shows summary, doesn't show the messagebox? How can i show the messagebox? Thanks!
-
Suppose that i have a validation summary on my web forms with showmessagebox and showsummary is set to true, a button and a custom validator. While coding the onclick i set IsValid property of that custom validator to false and return the function. Why the validation summary just shows summary, doesn't show the messagebox? How can i show the messagebox? Thanks!
I think u may use javascript if you want messagebox alert without pressing any button. U may add attribute of onblur to your textBoxes and if custom validator is false then call an alert function. --junior coder--
-
Suppose that i have a validation summary on my web forms with showmessagebox and showsummary is set to true, a button and a custom validator. While coding the onclick i set IsValid property of that custom validator to false and return the function. Why the validation summary just shows summary, doesn't show the messagebox? How can i show the messagebox? Thanks!
hai , in the html page,write the follwing code at last just between and otherwise it may execute with a blank page on background. <asp:Literal id="ltlAlert" runat="server" EnableViewState="False"> </asp:Literal> in the code (back)write Public Class file.aspx Inherits System.Web.UI.Page Protected WithEvents ltlAlert _ As System.Web.UI.WebControls.Literal then write a function so that '--------------------- Private Sub Say(ByVal Message As String) ltlAlert.Text = "alert('" & Message & "')" End Sub '-----------------(here VB code is used...use as you prefer and whereever u want to show this message,just call Say("Hello").... try this.....with regards.....rameez
-
hai , in the html page,write the follwing code at last just between and otherwise it may execute with a blank page on background. <asp:Literal id="ltlAlert" runat="server" EnableViewState="False"> </asp:Literal> in the code (back)write Public Class file.aspx Inherits System.Web.UI.Page Protected WithEvents ltlAlert _ As System.Web.UI.WebControls.Literal then write a function so that '--------------------- Private Sub Say(ByVal Message As String) ltlAlert.Text = "alert('" & Message & "')" End Sub '-----------------(here VB code is used...use as you prefer and whereever u want to show this message,just call Say("Hello").... try this.....with regards.....rameez
I tried your solution but there's an error appear: It's say that ltlAlert is a null referenced object. Besides, there's a error while rendering the page too. I don't understand why we have to have this code : EnableViewState="false"> Can you help me out! Thanks for your reply! :)