473,383 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Form Variables

In ASP.NET 2.0 I declared

Dim dst_subscr As New Data.DataSet

and in page_load I filled the databaset with data from 3 tables.

When I tried to use the database from another procedure (button_click
of same form) my dataset was empty, no tables inside. Why ? Shouldn't
keep the 3 tables since it's a form variable ?

Thanks in advance.

Mar 29 '06 #1
7 956
Are the tables being sucessfully added to the dataset at all, can you access
them anywhere?

"Chris" wrote:
In ASP.NET 2.0 I declared

Dim dst_subscr As New Data.DataSet

and in page_load I filled the databaset with data from 3 tables.

When I tried to use the database from another procedure (button_click
of same form) my dataset was empty, no tables inside. Why ? Shouldn't
keep the 3 tables since it's a form variable ?

Thanks in advance.

Mar 29 '06 #2
A regular form variable doesn't live between postbacks. You have to either
re-populate the dataset on every postback or store it in a persistant
location, such as a session variable.

Eliyahu

"Chris" <CL*****@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
In ASP.NET 2.0 I declared

Dim dst_subscr As New Data.DataSet

and in page_load I filled the databaset with data from 3 tables.

When I tried to use the database from another procedure (button_click
of same form) my dataset was empty, no tables inside. Why ? Shouldn't
keep the 3 tables since it's a form variable ?

Thanks in advance.

Mar 29 '06 #3
If I add a dataset.xsd, not from code. Will it make a difference ?

Mar 29 '06 #4
It seems I can access them only in PageLoad.

Mar 29 '06 #5
No. The problem is in populating the dataset with data.

Eliyahu

"Chris" <CL*****@gmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
If I add a dataset.xsd, not from code. Will it make a difference ?

Mar 29 '06 #6
Thanks a lot, up to now I got used to programming in VB6, and it's
difficult to work with ASP.NET.

Mar 29 '06 #7
Welcome to web programming!

Eliyahu

"Chris" <CL*****@gmail.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
Thanks a lot, up to now I got used to programming in VB6, and it's
difficult to work with ASP.NET.

Mar 29 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
Conditions: Register globals is set to on. Parse html as php is set to on. I have two forms OrderTest1 and OrderTest2 and need to be able to validate the data from OrderTest1 before passing to...
10
by: Dave Karmens | last post by:
If I have say 10 fixed variables, how can I set their values = to that of a form that is built dynamically? column1 column2 email = formvalue(0) fname = formvalue(1) lname = formvalue(2)...
13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
19
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the...
4
by: Baz | last post by:
Hi. I'm new to this VB.Net mullarkey, and I must say it is proving to be a very trying experience. Here is the latest in a long line of problems: The Scenario ========= I am building an...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
4
by: dac | last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form...
0
by: joshuajnoble | last post by:
Hi all, I'm having a strange problem where I need to build out form variables in an HTTPWebRequest and send them to an aspx page for processing. The page isn't recognizing the form variables at...
8
by: chromis | last post by:
Hi, I'm writing a contacts section for a cms on a website, I've decided to write the section in OO code. So far I have my Contacts object and a page structure I would use for a procedural site. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.