Hello,
I'm working with a datagrid control in ASP.NET. The datagrid shows a list of
products. One column shows the productnumber, one column shows the
productname, one column shows a picture of the product and the last column
shows an empty textbox with an 'OK' button.
People can enter a quantity in the empty textbox. After clicking on the 'OK'
button, the product and quantity should be added to another datagrid. The
problem is that I don't know how to read the quantity. I now do this as
follows (cells(5) is the template-column with the textbox, the 'OK' button
triggers the SelectedIndexCh anged event):
Private Sub grdArtikelen_Se lectedIndexChan ged(ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles grdArtikelen.Se lectedIndexChan ged
Dim txb As TextBox
=CType(Me.grdPr oducts.Selected Item.Cells(5).C ontrols(1), TextBox)
Dim dblQuantity As Double
dblQuantity = CType(txb.Text, Double)
End Sub
This code gets the right textbox, but the TEXT property is always empty. How
can I get the text that has been entered in the textbox?
Any help would be appreciated.
Greetings,
Remco 1 1237
> dblQuantity = CType(txb.Text, Double)
I guess this should be
dblQuantity = CType(txb.Value , Double)
"Remco Groot Beumer" <in**@rgbplus.n l> wrote in message news:<bo******* ***@news3.tilbu 1.nb.home.nl>.. . Hello,
I'm working with a datagrid control in ASP.NET. The datagrid shows a list of products. One column shows the productnumber, one column shows the productname, one column shows a picture of the product and the last column shows an empty textbox with an 'OK' button.
People can enter a quantity in the empty textbox. After clicking on the 'OK' button, the product and quantity should be added to another datagrid. The problem is that I don't know how to read the quantity. I now do this as follows (cells(5) is the template-column with the textbox, the 'OK' button triggers the SelectedIndexCh anged event):
Private Sub grdArtikelen_Se lectedIndexChan ged(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles grdArtikelen.Se lectedIndexChan ged
Dim txb As TextBox =CType(Me.grdPr oducts.Selected Item.Cells(5).C ontrols(1), TextBox)
Dim dblQuantity As Double
dblQuantity = CType(txb.Text, Double)
End Sub This code gets the right textbox, but the TEXT property is always empty. How can I get the text that has been entered in the textbox?
Any help would be appreciated.
Greetings,
Remco This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TJ |
last post by:
Dear PHP group,
First question:
I have an input form that upon pressing a button validates the values
entered into this form. I am using the following code recall this form if
there is an error in one of the requested fields:
<form name="form1" method="post" action= "InputForm.php" >
|
by: Mikko |
last post by:
Is it possible to read "label" from form-field?
<label for="product1">bread</label>
<input id="product1" name="product1" type="text" size="3">
number comes with $_GET;
but how do I read the "bread"?
|
by: luke |
last post by:
I'm trying to use an image as a background for a text input box.
<form>
<fieldset><input type="text" name ="blah" class="cheese"></fieldset>
</form>
I'm using this code as part of my css to overcome a background repeat bug in
IE 5/6.
fieldset>input.textfield {
|
by: Stumped and Confused |
last post by:
Hello,
I really, really, need some help here - I've spent hours trying to find a
solution.
In a nutshell, I'm trying to have a user input a value in form's
textfield. The value should then be assigned to a variable and output
using document.write.
(Note, there is no submit button or other form elements. Basically
|
by: TTD |
last post by:
Hi,
I have a form (input type) which is based on a table. Let's say it has 2
fields
1: numeric keyfield
2: textfield.
When the form opens the numeric is automatically added with 1. When I leave
the textfield empty and I close the form, the database is being written. Bu
| |
by: cbradio |
last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly with 3px padding around each form field, and no overlap. But the doctype changes the box model, I am told, and so the padding is added to the 100% width, leading to overlap and poor presentation. Unfortunately, I'm forced to use the doctype due to...
|
by: SkipNRun |
last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list.
Depends on the pull down list selection, I use script.aculo.us to validate the user input before submit and pass the necessary data, such as contact type, contact information and ranking to a php program for updating. This form should allow multiple...
|
by: Michael Munch |
last post by:
Hi
I want to read the value of af text-field, create dynamic, in a form.
Se below a small test-site to do that (but readning fails):
I use the function Test_Read for reading the value from the dynamic create
text-field "txtName".
I thanks...
|
by: Per Juul Larsen |
last post by:
Hi.
My Textfile looks like this
Variable 1
Variable 2
Variable 3
Variable 4
On opening the application it will read the textfile, and assign each
line of variable to at textfield in VB and then close the file.
|
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: 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,...
|
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: 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: 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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |