Dear All,
I have a web form which has a link and a drop down box. when I press a
link
a pop up window opens. This window has a lot of TEXTBOXES and a Save
button. When I fill the TextBoxes and press save the POP UP window closes.
Actually this POP UP window is a record of an employee. so basically I am
filling the personal information of the employee. What I want is that
when I
press save Button the POP UP window must close. And It should display the
ID number of recently entered Employee in the dropdown box. Below is my
Code
behind the save button in the POP UP window:
Dim strJavaScript As String
strJavaScript = "<script
language='javas cript'>window.o pener.execScrip t(""__doPostBac k('LinkButton1' ,'')"",""JavaSc ript"");window. close();</script>"
Page.RegisterSt artupScript("", strJavaScript)
I have an invisible LINKBUTTON1 on the web form which has the dropdownbox.
Now in the load event of web form is the following code:
If Not IsPostBack
Dim conHcpMain As SqlConnection
Dim dtrHcpMain As SqlDataReader
Dim cmdIDs As SqlCommand
Dim dtrIDs As SqlDataReader
cmdIDs = New SqlCommand("Sel ect * from HCP_IDs", conHcpMain)
dtrIDs = cmdIDs.ExecuteR eader()
dropID.DataSour ce = dtrIDs
dropID.DataText Field = "Hcp_Id"
dropID.DataValu eField = "Hcp_Id"
dropID.DataBind ()
dtrIDs.Close()
End if
This Code actually displays IDs of all the Employees in the Database.
And in the
click event of the LINKBUTTON1 I have the same code as above but without a
post back:
Dim conHcpMain As SqlConnection
Dim dtrHcpMain As SqlDataReader
Dim cmdIDs As SqlCommand
Dim dtrIDs As SqlDataReader
cmdIDs = New SqlCommand("Sel ect * from HCP_IDs", conHcpMain)
dtrIDs = cmdIDs.ExecuteR eader()
dropID.DataSour ce = dtrIDs
dropID.DataText Field = "Hcp_Id"
dropID.DataValu eField = "Hcp_Id"
dropID.DataBind ()
dtrIDs.Close()
When I add a record through a POP UP WINDOW it adds it perfectly into the
database. but it doesnt show the recently added record in the dropdownbox
Any help would be greatly appreciated.
cheers,
Sunil Sabir 0 956 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: thomas j |
last post by:
Hi,
I have a MySqlBase with a tabel named CARS and with 3 fields;
CarsType, CarsModel, CarsInfo.
Now I want to generate 2 dropdownboxes in PHP read from CARS.
First I will "load" CarsType into an dropdownbox, and then I make a
choice, exampel FORD, now the next dropdownbox (CarsModel) will show
Escort, Sierra and so...
Finally I will make a "actionbutton" named showinfo and when I click
it will show CarsInfo.
|
by: James P. |
last post by:
Hello there,
I have a bound-form using Navigator so that the user can move back and
forth to update record in the form. Every time a record was modified
and the user clicks the Navigator to either move backward or forward
to the next record, a message is popped up asking the user to confirm
the change. If the user clicks "Yes", the record should be updated
and the Navigator takes the user to the next record as clicked. If
the user...
|
by: sean |
last post by:
I have a table with fixed row of records SORTED by DATE using ADO pagination
method. The user can click a link in one table cell and go to another page
to modify the record. Once the updated record is saved the user will be
redirect back to the table. This time the record updated will be highlighted
so that the user knows where he came from. I basically pass the page number,
column and row number via querystring and store the info in a...
|
by: Dan2kx |
last post by:
Good evening Peeps
got another question....
OK, i have a continous form with tick boxes, the idea is that (currently a single record) is selected and then that record number is used in the openargs for another form which goes to the bookmark for that record.... with me so far??
I would like to know if it is possible to bookmark multiple record(ID's) and then skip through then on the second form?
if this is possible how would one...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |