C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




message box in asp.net


Posted Date: 28 Aug 2008      Total Responses: 4

Posted By: ABARNA       Member Level: Bronze     Points: 1


using JavaScript how can i create message box in asp.net(web application)

In vb.net there is a availability of tab control how it is possible in asp.net




Responses

Author: sivapriya    28 Aug 2008Member Level: GoldRating:     Points: 0
use alert..

ex:
alert("Anbae sivam");


Author: Athira Appukuttan    29 Aug 2008Member Level: DiamondRating:     Points: 5
Hi..

public static string GetAlert(string Message)
{
string Script = "";
Script += "<script language=JavaScript>\n";
Script += "alert('" + Message + "') \n";
Script += "</script>";
return Script;
}

Use..

Script = VetCareUtilities.GetAlert("No Records in Selected Working Date");
Page.ClientScript.RegisterStartupScript(typeof(Page), "NoRecords ", Script);


Author: Gitolekha Ray    29 Aug 2008Member Level: SilverRating:     Points: 4
Message box functionality is not available in asp.net, however you can use alerts.
Suppose you want that after successful save, user should receive a message, successfully saved, you can use the below inside the click event of save button,
RegisterStartupScript("Show", "<script>alert('Successfully Saved.');</script>");


Author: ANIL PANDEY    29 Aug 2008Member Level: DiamondRating:     Points: 6
hi,


u can use the following code for the alert or message box..


<script type="text/javascript" language="javascript">
function CheckValidity()
{
if (document.getElementById('txtLoginID').value=='' ) //NULL
{
alert('Please enter login ID.');
document.getElementById('txtLoginID').focus();
return false;
}
else if(document.getElementById('txtPassword').value=='')
{
alert('Please enter your password.');
document.getElementById('txtPassword').focus();
return false;
}
else
{
return true;
}
}
</script>



thanks
Anil



Post Reply
You must Sign In to post a response.
Next : Insertion into a table
Previous : Garbage colection
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use