|
 |
aspx_professional thread: when the item changes in the dropdownlist....
Message #1 by anirose_US@y... on Tue, 20 Aug 2002 18:52:28
|
|
Well ani....
I dont see any problem except that ur view state is not being
maintained when the page is poted back.... check the complete coe again and
find whether u clear the view state of that control.. else every thing
should work fine....
Well do send in the pages to sramanuj@c... and let'me check
in.....
keep me posted
S.Ramanujam
Programmer Analyst
38 & 39 Whites Road,
WCB - Whites Road Circular Building
Royapettah, Chennai - 600014
Ph : +xx xx xxx xxxx Extn 5113 [Off]
: +xx xx xxx xxxx [Res]
-----Original Message-----
From: anirose_US@y... [mailto:anirose_US@y...]
Sent: Thursday, August 22, 2002 9:45 PM
To: ASPX_Professional
Subject: [aspx_professional] when the item changes in the
dropdownlist....
Thank you for your reply.
yes I used the code which u just sent it to me but it crashes again.
let me explain the problem.
when user go to the one Item in the drop down list , it works as well but
when they want to change the item , it crashes and we get the error base
of index is out of range or Specified cast is not valid which is more
common.
but something else, when the user goes to the first item in the
dropdownlist SELECT A TYPE, it works ... it means ,They can choose another
item through the dropdownlist as well.
can you provide me by ur email? I can send you the page to see what is the
matter with this code...
mine is Anirose_us@y...
again thank you ...pls be in touch
> Well Anirose...
See ViewState will just maintain the Item values inside the
dropdown
even after u post back and u wont need to rebind the dropdown again to get
the values... do u add the items in the dropdown during runtime from db or
while developing... if u are doing thro code then check if u have done this
as below
Private Sub Page_load()
If !(Me.IsPostBack) then
... Now Append the dropdwon with values
from
DB....
.. all the code goes here....
EndIf
End Sub
One more is that see if u have checked the 'AutoPostBack' property of the
dropdown to true... all the above code goes only if this property is
true.... else even if u change the selected item in dropdown no value will
be posted to the server....
Or can u be more specific on 'crash'.. what happens exactly.....
keep me posted of issues.....
S.Ramanujam
Programmer Analyst
38 & 39 Whites Road,
WCB - Whites Road Circular Building
Royapettah, Chennai - 600014
Ph : +xx xx xxx xxxx Extn 5113 [Off]
: +xx xx xxx xxxx [Res]
-----Original Message-----
From: anirose_US@y... [mailto:anirose_US@y...]
Sent: Wednesday, August 21, 2002 12:22 AM
To: ASPX_Professional
Subject: [aspx_professional] when the item changes in the
dropdownlist....
hi friends,
I have a dropdownlist which works as well but when users want to change
the item, it crashes ... I know something related to view state might
effect on it but how can I add a code in the sub below to get ride of
that ? pls help me ...
private void lstExhibitTypes_SelectedIndexChanged(object sender,
System.EventArgs e)
{
// TODO Add code to clean up child viewstate so that one page type-->
another won't cause crash
}
Thank you ;)
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
|
|
 |