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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
chetan chandan
1.6k
39
14.9k
How to return values from scriptmanager.RegisterStartUpScrip
Jun 10 2014 2:52 AM
Hi,
I have this requirement in which i have to check for different conditions and based on its value a confirm box must be displayed with different messages. I have been successful in calling the confirm box from my aspx.cs file using ScriptManager.RegisterStartUpScript. The problem i am facing is i need to check the return value of this " ScriptManager.RegisterStartupScript(this, this.GetType(), "confirm", "javascript:confirm('Are you sure you want to delete');", true); " . To check the user has clicked which button Ok/Cancel. So i tried implementing it in these two different ways:
1. ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:if(confirm('Are you sure you want to delete') == false) return false;", true);
2. ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:return confirm('Are you sure you want to delete');", true);
But no success, with these approaches confirm box doesn't even appear and I am not using any client side code in the aspx page.
Any kind of help will be appreciated.
Thanks in advance.
Reply
Answers (
1
)
get the textbox's value in asp.net which is inside a light
Qr image Generations