473,385 Members | 1,712 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,385 software developers and data experts.

Problems with panels and Postback (ASP.Net)

Hi,
I would like to use Panels in my ASP.Net code. It works OK if I put static
controls on it but if I have a drop down list or a listbox control that need
to have 'EnablePostBack' = true then the SelectedIndexChanged event does not
fire.
In the case of the Drop down list control I get an error 'Failed to Load
ViewState etc....'
For the Listbox, I don't get this error but the SelectedIndexChanged event
is not being fired.
If the control is not loaded into the Panel, the events fire fine.
Please Help!
Nov 19 '05 #1
2 1091
I can tell one thing for the viewstate problem.
Make sure that you do not remove some controls between postbacks.

The bottom line is, if you remove a control from the code that was there
when the page loaded for the first time, you will have this viewstate
problem.

And for not firing change event, make sure that your drop down does not
become visible false in the page load before you onchange event is being
executed.

I hope I gave you some idea.

--

SevDer
http://www.sevder.com
A new .NET Source For .NET Developers
"ASP.Net Event not firing" <AS******************@discussions.microsoft.com>
wrote in message news:36**********************************@microsof t.com...
Hi,
I would like to use Panels in my ASP.Net code. It works OK if I put static
controls on it but if I have a drop down list or a listbox control that
need
to have 'EnablePostBack' = true then the SelectedIndexChanged event does
not
fire.
In the case of the Drop down list control I get an error 'Failed to Load
ViewState etc....'
For the Listbox, I don't get this error but the SelectedIndexChanged event
is not being fired.
If the control is not loaded into the Panel, the events fire fine.
Please Help!

Nov 19 '05 #2
sam
yep, you are removing controls between postbacks and maybe you have the
viewstate disabled for the listbox so that's why its not giving the
error.

you need viewstate enabled for those events to fire so that explains
the other problem.

if you need any more help here please ask.

Nov 19 '05 #3

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

Similar topics

3
by: Charlie Dison | last post by:
Hi There, Should I be able to show and hide panels in an asp.net page without requiring a postback? I thought there was a way to do this using java script. Can anyone give me an example? I...
3
by: Jonas | last post by:
Hi! I have aspx-page where I use multiple panels to make room for more controls than would otherwise fit onto one page. On submit, the controls on all panels, visible or not, should be validated...
0
by: aarepasky | last post by:
I am using ASP.NET 2.0 and C#. I am creating a page with multiple panels on it. In the panels are user controls that have the screen layout to input data. I only show one panel at a time by...
6
by: rishabhshrivastava | last post by:
Hello All, I am using ASP.NET 2.0 and I am experiencing a problem using vbscript that is this script on client side is preventing the postback of my controls. I have a dropdownlist which is...
3
by: moshi | last post by:
Hey, I'm working with asp.net 2.0. I make objects (like ddl, textbox...) disabled=true in client side. Then, when I get to the server in post action, these objects lose their value. For example:...
4
by: tshad | last post by:
I am trying to hide and show certain parts of my code (which I have no problem doing with DW). In VS 2003, it won't let you use <div runat="server"to section of parts of my code in a table. This...
3
by: =?Utf-8?B?TWlndWVsIElzaWRvcm8=?= | last post by:
Hi, I have an ASP.NET 2.0 application that allows content search. Search is included in all pages and a cross postback to the search results page is performed with the text inserted by the user....
2
by: arti | last post by:
In Asp.net form, I have 3 panels. I want a button on top of each panel to hide or display the panel. I am able to do it. But when there is any postback, the page loads with its design time setting-...
3
by: Andrea Gasperi | last post by:
Hi there not sure if this is the right place but i'm proud to use for the first time the "Managed Newsgroups" feature of my brand new MSDN subscription :-) So here is the problem. I've...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
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,...
0
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...
0
Oralloy
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 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.