TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Javascript Alert Message from Code Behind in ASP.NET
Samir Bhogayta
Jun 27
2016
Code
802
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
public
static
void
ShowAlertMessage(
string
error)
{
Page page = HttpContext.Current.Handler
as
Page;
if
(page !=
null
)
{
error = error.Replace(
"'"
,
"\'"
);
ScriptManager.RegisterStartupScript(page, page.GetType(),
"err_msg"
,
"alert('"
+ error +
"');"
,
true
);
}
}
Javascript
Alert Message
ASP.NET