473,626 Members | 3,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javas cript'>" & vbCrLf & "var temp
= window.prompt(' Enter ID:','');window .returnValue = temp;" & vbCrLf &
"</script>" & vbCrLf
Page.RegisterSt artupScript("Po p", strPop)
End Sub

Thanks a lot

Nov 19 '05 #1
2 7686
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(ByV al sender As System.Object, ByVal e AsSystem.EventAr gs) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javas cript'>" & vbCrLf & "var temp= window.prompt(' Enter ID:','');window .returnValue = temp;" & vbCrLf &"</script>" & vbCrLf
Page.RegisterS tartupScript("P op", 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.goo glegroups.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(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles btnID.Click
Dim strPop As String
strPop = "<script language='javas cript'>" & vbCrLf & "var temp
= window.prompt(' Enter ID:','');window .returnValue = temp;" & vbCrLf &
"</script>" & vbCrLf
Page.RegisterSt artupScript("Po p", 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
834
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 using this forms application wizard prevents thewindow from opening. The program otherwise runs correctly. Inoticed that the wizard gave me a main with the notation: int APIENTRY main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR ...
0
1513
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 window to open and some information to scroll by.My problem is that using the Windows Form Application wizardprevents the command prompt window from opening. Otherwise thedll functions correctly. I noticed that the wizard used a mainin the form:...
2
2756
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 I need message to be printed "Completed Sucessfully" or Failed in command prompt window
1
295
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 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 =...
1
1461
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 something on it or not. Then I realized that if i forget to look if that patient already has his files and saved, it would automatically overwrite everything. After searching your forums for a little bit I found the code for asking to overwrite...
1
2235
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 “department” prompt but leaves the “access” prompt empty or clicks cancel, I want the Alert Message List to look… LIKE THIS: ID Number: “value” ...
0
1199
by: srirampavan | last post by:
how to get login prompt window when we press radio button??/
2
7234
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
8268
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8641
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2628
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.