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. Returning a Notification or Error Message to the User

Returning a Notification or Error Message to the User

Scheduled Pinned Locked Moved ASP.NET
comsysadminbeta-testinghelptutorial
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.
  • W Offline
    W Offline
    Waleed Eissa
    wrote on last edited by
    #1

    I'm looking for a clean way to return a notification message to the user. For example, if I have a forum and the user adds a post to the forum I return something like "the post was added successfully". Now, in order to do this, I usually create three panels, one for the controls needed to add the post and another one for the notification message in case of success and the third one is an error message in case something goes wrong. When the user clicks the "Add Post" button I hide the controls panel and show the panel that contains the notification message (if the post was added successfully) or show the panel that contains the error message (if the add post failed). I wonder if there's a better way to do that. I thought about two alternatives and I would like to have some feedback from you. The first alternative is to use Server.Transfer(), ie. when the user clicks the "Add Post" button, the request is transferred to another page that contains the notification message (or to a page that contains an error message if the add post failed). The other idea is by using ContentPlaceHolder controls. I always use a masterpage with one ContentPlaceHolder control for page contents, I was wondering whether it's possible to clear all contents from the ContentPlaceHolder control in a content page and just add the success notification or error message. Do you have alternatives other than those two? Which approach of the three (if any) do you think is better? And what do of the advantages and disadvantages of each of them? Your feedback is really appreciated ..

    Waleed Eissa Software Developer Sydney

    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