473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

get user enter value from prompt window asp.net

I need to prompt the user to enter ID. I can open up prompt fine using
javascript code below. However I am not sure how to get value that user
entered in user prompt window. I have to check this value to see if it
exists in the database.

Private Sub btnID_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javascript'>" & vbCrLf & "var temp
= window.prompt('Enter ID:','');window.returnValue = temp;" & vbCrLf &
"</script>" & vbCrLf
Page.RegisterStartupScript("Pop", strPop)
End Sub

Thanks a lot

Nov 19 '05 #1
2 7662
Hi,

You put the value retuned into a <input> of type HIDDEN
and then call the page refresh.. and at server side take
the value from this hidden variable. and perfrom the
further task.
regards
subramanian
-----Original Message-----
I need to prompt the user to enter ID. I can open up prompt fine usingjavascript code below. However I am not sure how to get value that userentered in user prompt window. I have to check this value to see if itexists in the database.

Private Sub btnID_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javascript'>" & vbCrLf & "var temp= window.prompt('Enter ID:','');window.returnValue = temp;" & vbCrLf &"</script>" & vbCrLf
Page.RegisterStartupScript("Pop", strPop)
End Sub

Thanks a lot

.

Nov 19 '05 #2
I built a selection of user controls that create various client-side prompts
and dialogs, and you can reuse these or copy the code. See:
http://www.daveandal.net/books/6744/default.asp
for the main page and download links, or run these examples from the online
examples page:
a.. Alert, Prompt and Confirm Dialogs from a User Control
a.. Browser-Adaptive Dialogs from a User Control
a.. Internet Explorer Dialog Windows from a User Control
a.. Adaptive Dialog Windows from a User Control

<am***********@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I need to prompt the user to enter ID. I can open up prompt fine using
javascript code below. However I am not sure how to get value that user
entered in user prompt window. I have to check this value to see if it
exists in the database.

Private Sub btnID_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javascript'>" & vbCrLf & "var temp
= window.prompt('Enter ID:','');window.returnValue = temp;" & vbCrLf &
"</script>" & vbCrLf
Page.RegisterStartupScript("Pop", strPop)
End Sub

Thanks a lot

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Laura Zeafla via .NET 247 | last post by:
I used the .NET forms application wizard. From the form youclick a button and it calls a C++ function through its dll. This function is supposed to pop-up a command prompt window. Something about...
0
by: Laura Zeafla via .NET 247 | last post by:
I have an application I wrote using the Windows Form Application(.NET) wizard. Pressing a button calls a function in a dllwritten in Visual C++. This function is supposed to cause acommand prompt...
2
by: Mustaq | last post by:
Hi, I have an application in VB.NET which runs from command prompt, I need output message in the same command prompt window, Example D:\Mustaq\ORC\Orc 3.7\Insertor\Insertor\bin>insertor.exe ...
1
by: ambersaria420 | last post by:
I need to prompt the user to enter ID. I can open up prompt fine using javascript code below. However I am not sure how to get value that user entered in user prompt window. I have to check this...
1
by: Aere | last post by:
Hello, I'm coding a program that saves information about my patients, so i created a rich textbox for every field. (Name, Tel, etc). The program saves a .txt for each field, no matter if there is...
1
by: cruzzer | last post by:
I need to know how can I exclude a data item from the Alert Window’s list message if the user leaves a prompt window blank. Example : If the user types a value to both “idnumber” and...
0
by: srirampavan | last post by:
how to get login prompt window when we press radio button??/
2
by: jerald m | last post by:
Hi, how can i pass the user input value of ( in text box field) to the another Jsp in url? Form Code <td> <input type="text" name="dil_ProjectCode" id="dil_ProjectCode"> </td>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.