C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Message Box: Server Side and Client Side


Posted Date: 19 Apr 2005    Resource Type: Articles    Category: .NET Framework
Author: abhayMember Level: Gold    
Rating: 1 out of 5Points: 10



This article explains that how you can show Messages Boxes in ASP.NET



These are some ways :
1. Using server side message box
2. Add Attributes

Understanding exactly the case and situation, you can choose any of the above method stated

The Server Side Message Box needs to import Microsoft.Windows.Forms in your Reference List of the project,

and easiest to use. If you want to use this

-->> Add reference for Microsoft.Windows.Forms

-- >> imports Microsoft.Windows.Forms

Dim msbox as messageBox
msbox.show("hello") ' will shows the simple alert box

Dim msbox As MessageBox
Dim result As String
result = msbox.Show("test", "test", MessageBoxButtons.OKCancel, MessageBoxIcon.Error,

MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
If result = "OK" Then
Response.Write("You pressed OK")
Else
Response.Write("You pressed CANCEL")
End If



Add Attribute :
When you doesnot want to overloads your project with the assembely then you can use this method. In the Page Load section of the form State this for calling a confirmation box on BtnDelete click

Page_Load
BtnDelete.Attributes.Add("OnClick","return(confirm('Do you want to delete this?'));")

where BtnDelete is server side button. This will call only if you press Ok in the confirmation Box.



Regards,
Abhay Lakkad



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Achieving Customization using Reflection
Previous Resource: Embedding HTML into ASP.Net Form
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use