Hi all,
I was wondering if someone could help me solve this problem,
I have created a form which is supposed to do a simple update,
these are my fields
ProductId.text
ItemName.Text
ItemPrice.Text
OrderUnitCost.Text
OrderUnitSize.Text
QuantityOnHand.Text
ReorderLevel.Text
ReStockCharge.text
category (for category i have a dropwonlist) and a text box to be able to add a new Category.
for my save button I have the following:
Protected Sub SaveProduct_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveProduct.Click
If ValidData() = True Then
Dim systemmgr As New eRaceSystem.eRace
Dim Categorylistinfo As DataSet
Dim theCategory As String
If Category.Text.Trim.Length > 0 Then
theCategory = Category.Text.Trim
Else
theCategory = CategoryList.SelectedValue
End If
Try
systemmgr.UpdateProduct(ProductId.Text, ItemName.Text, ItemPrice.Text, OrderUnitCost.Text, _
OrderUnitSize.Text, QuantityOnHand.Text, ReorderLevel.Text, ReStockCharge.Text, Category.selectedvalue)----this keeps telling that selected value isnot a member of systems.ui.webcontrols. textbox------
iknow if i only had my drop down list I could just have category.selectedvalue, but i dont know why i get this error----- I would really apreciate some help.
FormMessages.Text = "Product Updated."
Catch ex As Exception
FormMessages.Text = ex.Message
End Try
End If
End Sub
thanks
nueva
5 1288
Hi all,
I was wondering if someone could help me solve this problem,
I have created a form which is supposed to do a simple update,
these are my fields -
ProductId.text
-
ItemName.Text
-
ItemPrice.Text
-
OrderUnitCost.Text
-
OrderUnitSize.Text
-
QuantityOnHand.Text
-
ReorderLevel.Text
-
ReStockCharge.text
-
'category (for category i have a dropwonlist) and a text box to be able to 'add a new Category.
-
'for my save button I have the following:
-
Protected Sub SaveProduct_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveProduct.Click
-
-
If ValidData() = True Then
-
Dim systemmgr As New eRaceSystem.eRace
-
Dim Categorylistinfo As DataSet
-
Dim theCategory As String
-
-
If Category.Text.Trim.Length > 0 Then
-
theCategory = Category.Text.Trim
-
Else
-
theCategory = CategoryList.SelectedValue
-
End If
-
Try
-
systemmgr.UpdateProduct(ProductId.Text, ItemName.Text, ItemPrice.Text, OrderUnitCost.Text, _
-
OrderUnitSize.Text, QuantityOnHand.Text, ReorderLevel.Text, ReStockCharge.Text, Category.selectedvalue)'----this keeps telling that 'selected value isnot a member of systems.ui.webcontrols. textbox------
-
'iknow if i only had my drop down list I could just have 'category.selectedvalue, but i dont know why i get this error----- I would 'really apreciate some help.
-
FormMessages.Text = "Product Updated."
-
Catch ex As Exception
-
FormMessages.Text = ex.Message
-
End Try
-
End If
-
End Sub
-
thanks
nueva
For starters, Please put your code in CODE tags so that we can spend less time decyphering the visual appearance of your code. :)
Is category a dropdown list or a text box?
Because i see you have a categoryList and a category.
It seems your categoryList is the dropdown and category is a text box.
a text box doest not have a selectedValue member
cheers
Hi
Sorry I should have done that first, and yes category is a text box, but i also have a drop down which is category list.
For starters, Please put your code in CODE tags so that we can spend less time decyphering the visual appearance of your code. :)
Is category a dropdown list or a text box?
Because i see you have a categoryList and a category.
It seems your categoryList is the dropdown and category is a text box.
a text box doest not have a selectedValue member
cheers
Well,, I dont think you got my point from the previous post - theCategory = Category
-
Else
-
theCategory = CategoryList.SelectedValue
-
From your code(in the update statement)....Category.SelectedValue is an invalid syntax. Intellisense should tell you that.
So iin your update statement change it to Category.Text
ok, thanks.
catepory.text doesnt work for some reason. I will try to figure out, thanks for looking into it.
Good luck,
Try using the debugging feature on why it isint working,
Something that will make you find it out faster
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Flos |
last post by:
Hello!
(sorry for my bad english)
the following problem: i have i site where one must enter data which is
safed in a database.
There are also drop down lists, which values are database...
|
by: Eric |
last post by:
Hey Everyone..
I have a form that has approximately 7 text fields and 1 checkbox.
Generally when this form is submitted(to itself BTW) it works fine,
however, when the checkbox is only field...
|
by: jason |
last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an
existing pulldown on a page without having to re-submit the page for the
user to see the pulldown populated with an...
|
by: daveland |
last post by:
I am working on some JavaScript that dynamically adds rows to a table
in response to a button click. A new row does appear on the screen
when the button is clicked. However, that table to which a...
|
by: Ian Davies |
last post by:
Hello
In a php file I have a drop down list with index numbers in whos default
value is feed into an sql query that filters records from my database and
displays them in an html table. Trouble...
| |
by: Wes Weems |
last post by:
I'd like to have a 3 values in a drop down, and have a validator not allow a
form submit unless its 2 of the 3 values (eg, one of the values says "select
one")
I used custom validator and did a...
|
by: Greg Scharlemann |
last post by:
I'm trying to setup a dyamic dropdown list that displays a number of
text fields based on the selected number in the dropdown. The problem
I am running into is capturing the data already entered...
|
by: gihope |
last post by:
Hi, I have an ASP.NET 2.0 C# issue that has been troubling me for some time, and if someone could shed some light on this I would appreciate it.
This seems to be a commonly themed question,...
|
by: bdbeames |
last post by:
I have a page with google maps up and running. When a user clicks on a location from the map I would like to populate a drop down with data from the database related to that location. I have it up...
|
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...
|
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,...
| |
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: 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...
|
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,...
|
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...
|
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 ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |