Getting prompt input value
Hi guys, I have the following code on my page load event so the user can enter a date when they click button2.
Code:
Button2.Attributes.Add("onclick", "var dteDate = prompt('Enter Import Date');")
My question is, how can I get this value they input when the code runs the server click event?
Thanks
Re: Getting prompt input value
I don't think what you are attempting to do is possible or atleast I could not figure out a whay to do it. I have to ask why you prompt the user for this value instead of just placing a textbox on the page and going with that value. It would seem like it would be easier and you could use some of the ASP.NET validation controls to validate the value if it was required.
Re: Getting prompt input value
I guess one way to do it is to place one hidden control in your form and get the value with the dim x as x =ctype(request.form("yourhiddenctl"),x) and in your script doing something like
var x = document.getelementbyid("nameofyourhiddenctl");
x=window.prompt("msg");
hope this help
Re: Getting prompt input value
Bump, anyone know how to do this?