Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want javascript prompt box in button click event.
I have searched many, but I can't get appropriate result.
Is there anyone who know or provide link or suggest me how to do.

Thank You
Posted
v2

1 solution

Please check the correct answer[^] for the question Display a “Yes / No” alert box in C# code behind[^], where there are two solutions to do it in aspx and code behind page.

You can also go for this answer[^], where you have to use RegisterStartupScript[^] to build the confirm or prompt box.

[update] (as per the comments added by OP)

For your requirement (to show one prompt box to take input from User), you just need to write javascript codes for that using RegisterStartupScript.
You can find example of prompt box and codes at JavaScript Prompt Boxes[^]. You just need to write these codes inside RegisterStartupScript
Just try it out and let me know what problems you are facing.

[/update]

Thanks...
 
Share this answer
 
v2
Comments
Yatin chauhan 3-Nov-12 10:24am    
i have already do this for confirm box.. now i want Prompt box that user input sting in that and i want to update that sting in database table.
Have u tried to build a prompt box using RegisterStartupScript ?
If yes, then can u please show me the code ?
See my [update] answer above.

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