473,806 Members | 2,845 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 7703
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
1526
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
2767
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
1470
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
2244
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
1203
by: srirampavan | last post by:
how to get login prompt window when we press radio button??/
2
7243
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
9719
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
9597
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10618
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10366
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...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
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...
1
4329
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
2
3850
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.