Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Validation Summary.ShowMessageBox ???

Validation Summary.ShowMessageBox ???

Scheduled Pinned Locked Moved ASP.NET
questionasp-net
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Blue_Skye
    wrote on last edited by
    #1

    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!

    H R 2 Replies Last reply
    0
    • B Blue_Skye

      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!

      H Offline
      H Offline
      hakanaktan
      wrote on last edited by
      #2

      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--

      1 Reply Last reply
      0
      • B Blue_Skye

        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!

        R Offline
        R Offline
        Rameez Mohammed
        wrote on last edited by
        #3

        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

        B 1 Reply Last reply
        0
        • R Rameez Mohammed

          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

          B Offline
          B Offline
          Blue_Skye
          wrote on last edited by
          #4

          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! :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups