2
Answers

Capturing Javascript.Window.Prompt values in ASP,NET

Ask a question
karthik

karthik

18y
3.1k
1

i have this section of code in my ASP.NET web application

string promptBox = "<script language= 'javascript'>"+ "window.prompt('" + "Enter a Valid IP" + "')" + "</script>";

Page.RegisterStartupScript("IP selection",promptBox);

I can't figure a way to capture the value entered by the user in the prompt into my ASP.NET application. I basically want to store this value in a string and access it within my code-behind.

Thanx,
KV


Answers (2)