Click here to Skip to main content
15,889,507 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
How can i display prompt messages in asp.net? this code i want to write in code part..
Posted
Comments
_Zorro_ 13-Jul-12 9:01am    
Do you mean an alert on the browser?

You can do it using:
MSDN: RegisterClientScriptBlock Method[^] OR
MSDN: RegisterStartupScript Method[^]
Using them, you can inject the scripts into a page from server side and based on certain condition (and specific to page.)

For samples on how to use it:
How to Use RegisterClientScriptBlock & RegisterStartupScript[^]
Inject javascript from server - Sample[^]
 
Share this answer
 
a serverside language on web cannot prompt. You have to use javascript.

http://www.w3schools.com/js/js_popup.asp[^]
 
Share this answer
 
Comments
Sandeep Mewara 13-Jul-12 10:02am    
Yes & No. Server side cannot prompt but can inject script for it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900