473,320 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,320 software developers and data experts.

Loosing informations when PostBack

Hi all

I'm developping an ASPX application with C# code behind, with Visual Studio 2003 and .NET 1.1

In my form, I have a DropDownList (filled), and an empty Table (web form), which i want to fill when something is selected in my DropDownList

The problem is : when i select something in my DropDownList, I fill the table with whatever i want, and everything is OK. But then, in the next PostBack (with a submit button or whatever else), all the data filled in my Table is lost! I can't retrieve it

This is a problem because here is how I want my application to work : when someone arrives on my page, he just sees the DropDownList. He selects what he wants in it, and it is displayed in the tab, which is filled with text and checkBoxes. Then, he can click on a submit button to validate his modifications. But the problem is that in the function that is called by the eventHandler of my submit button, when i try to access my table, it is empty...

EnableViewState is set to True for all my controls

Could anybody help me out of here

Thanks

Floren
Nov 18 '05 #1
1 1200
Hi, Florent,

Whatever control you add dynamically to the page needs to be added once
again on the next post-back in order to remain visible. On the other hand,
if you don't need the controls after the post back you can still access the
posted values using the Request.Form collection.

Hope this helps
Martin
"Florent" <an*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
Hi all,

I'm developping an ASPX application with C# code behind, with Visual Studio 2003 and .NET 1.1 .
In my form, I have a DropDownList (filled), and an empty Table (web form), which i want to fill when something is selected in my DropDownList.
The problem is : when i select something in my DropDownList, I fill the table with whatever i want, and everything is OK. But then, in the next
PostBack (with a submit button or whatever else), all the data filled in my
Table is lost! I can't retrieve it.
This is a problem because here is how I want my application to work : when someone arrives on my page, he just sees the DropDownList. He selects what
he wants in it, and it is displayed in the tab, which is filled with text
and checkBoxes. Then, he can click on a submit button to validate his
modifications. But the problem is that in the function that is called by the
eventHandler of my submit button, when i try to access my table, it is
empty....
EnableViewState is set to True for all my controls.

Could anybody help me out of here?

Thanks,

Florent


Nov 18 '05 #2

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

Similar topics

10
by: Piotr Wolski | last post by:
hello, as always i have a problem:-) i'm using HTML form. User is adding some date to this form and after that i'm generating plot. When plot is generated i can see en empty form and a plot. I...
11
by: Sims | last post by:
Hi, I heard that there was a chance of 'loosing' a session ID between pages, (when the user clicks from one link to another). Is it really possible? Where could I find a definitive answer to...
2
by: Lionel | last post by:
Hi all, I would like having more informations on how we could exchange informations and/or objects between PERL and JAVA. We have a Java programs that open, maintain and close telnet...
2
by: mg | last post by:
I want to hold references to several window objects var win = window.open(... in a javascript array AND not loose the elements in this array when the .aspx page is reloaded after one of...
3
by: Windjammer | last post by:
I seem to be loosing my session variable as I move from one application to another The first application presents a menu of applications the user is authed for When I call the next application and...
2
by: Prodip Saha | last post by:
I am sure there is an easy fix for this problem. I am reloading the same page at an interval using the meta refresh tag in aspx page. This page has one textbox and one button. The problem is -when...
6
by: Gauthier Segay | last post by:
Hello, I've problem on subsequent postbacks after a Server.Transfer was done. In our application framework we have a method that pass parameters (via HttpContext.Items) and navigate to another...
0
by: Dan | last post by:
Hi!, When I Pass my Client Class Between Form1 to Form2 to Form3 I lose reference If inside the Form3 I Reset the Client With "New Client" Example : public class Client
1
by: Owen Richardson | last post by:
I have an asp.net website where i have a quick search facility built into my master page. the search is a web control, with a drop down country box and a list box full of cities. When i select...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.