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. Using MsgBox in my Custom Web (Server-Side) Component

Using MsgBox in my Custom Web (Server-Side) Component

Scheduled Pinned Locked Moved Web Development
helpsysadminquestion
1 Posts 1 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.
  • H Offline
    H Offline
    howardjr
    wrote on last edited by
    #1

    I want to output helpful messages to the user when they are input invalid vales into the various properties of the designer properties window. These will also "fire" when the properties in the component are read as the web-page containing the component is loaded into the designer editor. The problem is that when the page is rendered, the properties may "fire" off one of the messages, and this causes a page building fault indicating that I can't use the MsgBox. To get around this I built a wrapper on MsgBox that has a "no output" flag that I can toggle on and off in my code. Then I put toggled it off at the top of the Render and CreateChildControls subroutines, but sometimes I still get the page building fault. Are there other places I can add my code to turn off my MsgBox wrapper and prevent the fault? Also, I usually call to my MsgBox wrapper in a Try/Catch Block so that I can print out the more helpful message, but during the page building/render phase, I'd rather re-throw the exception and let that error be reported. So, is there some sort of variable or function call my code can look at to see if the page is being rendered?

    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