I have an asp.net vb page with two web user controls on it. The first user
control, uc1.ascx has a series of list boxes that are populated in series by
each other with ONSELECTEDINDEXCHANGED.
In the second control, uc2.ascx, lower down on the page, there is an
imagebutton. When the imagebutton is clicked, it goes to the same page with
a change in url parameter pageID. The control mentioned above sticks
around, while the second one is swapped out for another web user control,
uc3.ascx.
The values populated and selections in the listbox in the uc1.ascx are
getting lost despite viewstate being enabled as true.
What is going on?
The imagebutton looks like this:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click
Response.Redirect("~/advanced/default.aspx?pageID=shas")
End Sub
--
_____
DC G 5 1302
DC Gringo wrote: I have an asp.net vb page with two web user controls on it. The first user control, uc1.ascx has a series of list boxes that are populated in series by each other with ONSELECTEDINDEXCHANGED.
In the second control, uc2.ascx, lower down on the page, there is an imagebutton. When the imagebutton is clicked, it goes to the same page with a change in url parameter pageID. The control mentioned above sticks around, while the second one is swapped out for another web user control, uc3.ascx.
The values populated and selections in the listbox in the uc1.ascx are getting lost despite viewstate being enabled as true.
What is going on?
The imagebutton looks like this:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click Response.Redirect("~/advanced/default.aspx?pageID=shas") End Sub
Using Response.Redirect causes all viewstate to be lost.
With Redirect, you call the page as if it is the first time.
I suggest you omit the Response.Redirect, and do the swapping in
imgShasTab_Click .
--
Jos
Well that certainly makes sense.
Ok, so I tried:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click
shas1.Visible = True
Me.Visible = False
End Sub
This Sub imgShasTab_Click is in the same control as the imagebutton control.
The result is that the Me.Visible = False part works, but the shas1.visible
part does not.
What am I doing wrong?
_____
DC G
"Jos" <jn*************@fastmail.fm> wrote in message
news:u$**************@TK2MSFTNGP15.phx.gbl... DC Gringo wrote: I have an asp.net vb page with two web user controls on it. The first user control, uc1.ascx has a series of list boxes that are populated in series by each other with ONSELECTEDINDEXCHANGED.
In the second control, uc2.ascx, lower down on the page, there is an imagebutton. When the imagebutton is clicked, it goes to the same page with a change in url parameter pageID. The control mentioned above sticks around, while the second one is swapped out for another web user control, uc3.ascx.
The values populated and selections in the listbox in the uc1.ascx are getting lost despite viewstate being enabled as true.
What is going on?
The imagebutton looks like this:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click Response.Redirect("~/advanced/default.aspx?pageID=shas") End Sub
Using Response.Redirect causes all viewstate to be lost. With Redirect, you call the page as if it is the first time.
I suggest you omit the Response.Redirect, and do the swapping in imgShasTab_Click .
--
Jos
Anyone? A little help on this?
_____
DC G
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:u8**************@TK2MSFTNGP15.phx.gbl... Well that certainly makes sense.
Ok, so I tried:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click
shas1.Visible = True Me.Visible = False
End Sub
This Sub imgShasTab_Click is in the same control as the imagebutton
control. The result is that the Me.Visible = False part works, but the
shas1.visible part does not.
What am I doing wrong?
_____ DC G "Jos" <jn*************@fastmail.fm> wrote in message news:u$**************@TK2MSFTNGP15.phx.gbl... DC Gringo wrote: I have an asp.net vb page with two web user controls on it. The first user control, uc1.ascx has a series of list boxes that are populated in series by each other with ONSELECTEDINDEXCHANGED.
In the second control, uc2.ascx, lower down on the page, there is an imagebutton. When the imagebutton is clicked, it goes to the same page with a change in url parameter pageID. The control mentioned above sticks around, while the second one is swapped out for another web user control, uc3.ascx.
The values populated and selections in the listbox in the uc1.ascx are getting lost despite viewstate being enabled as true.
What is going on?
The imagebutton looks like this:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click Response.Redirect("~/advanced/default.aspx?pageID=shas") End Sub
Using Response.Redirect causes all viewstate to be lost. With Redirect, you call the page as if it is the first time.
I suggest you omit the Response.Redirect, and do the swapping in imgShasTab_Click .
--
Jos
Can you put some javascript in the onload event to investigate what the
visibility property is at the time the page loads?
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl... Anyone? A little help on this?
_____ DC G
"DC Gringo" <dc******@visiontechnology.net> wrote in message news:u8**************@TK2MSFTNGP15.phx.gbl... Well that certainly makes sense.
Ok, so I tried:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click
shas1.Visible = True Me.Visible = False
End Sub
This Sub imgShasTab_Click is in the same control as the imagebutton control. The result is that the Me.Visible = False part works, but the shas1.visible part does not.
What am I doing wrong?
_____ DC G "Jos" <jn*************@fastmail.fm> wrote in message news:u$**************@TK2MSFTNGP15.phx.gbl... > DC Gringo wrote: > > I have an asp.net vb page with two web user controls on it. The > > first user control, uc1.ascx has a series of list boxes that are > > populated in series by each other with ONSELECTEDINDEXCHANGED. > > > > In the second control, uc2.ascx, lower down on the page, there is an > > imagebutton. When the imagebutton is clicked, it goes to the same > > page with a change in url parameter pageID. The control mentioned > > above sticks around, while the second one is swapped out for another > > web user control, uc3.ascx. > > > > The values populated and selections in the listbox in the uc1.ascx > > are > > getting lost despite viewstate being enabled as true. > > > > What is going on? > > > > The imagebutton looks like this: > > > > Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e > > As > > System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click > > Response.Redirect("~/advanced/default.aspx?pageID=shas") > > End Sub > > Using Response.Redirect causes all viewstate to be lost. > With Redirect, you call the page as if it is the first time. > > I suggest you omit the Response.Redirect, and do the swapping in > imgShasTab_Click . > > -- > > Jos > >
I'd be happy to, could I get a code sample?
_____
DC G
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl... Can you put some javascript in the onload event to investigate what the visibility property is at the time the page loads?
-- Regards, Alvin Bruney [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx] Got tidbits? Get it here... http://tinyurl.com/27cok "DC Gringo" <dc******@visiontechnology.net> wrote in message news:ea**************@TK2MSFTNGP10.phx.gbl... Anyone? A little help on this?
_____ DC G
"DC Gringo" <dc******@visiontechnology.net> wrote in message news:u8**************@TK2MSFTNGP15.phx.gbl... Well that certainly makes sense.
Ok, so I tried:
Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click
shas1.Visible = True Me.Visible = False
End Sub
This Sub imgShasTab_Click is in the same control as the imagebutton control. The result is that the Me.Visible = False part works, but the shas1.visible part does not.
What am I doing wrong?
_____ DC G "Jos" <jn*************@fastmail.fm> wrote in message news:u$**************@TK2MSFTNGP15.phx.gbl... > DC Gringo wrote: > > I have an asp.net vb page with two web user controls on it. The > > first user control, uc1.ascx has a series of list boxes that are > > populated in series by each other with ONSELECTEDINDEXCHANGED. > > > > In the second control, uc2.ascx, lower down on the page, there is
an > > imagebutton. When the imagebutton is clicked, it goes to the same > > page with a change in url parameter pageID. The control mentioned > > above sticks around, while the second one is swapped out for
another > > web user control, uc3.ascx. > > > > The values populated and selections in the listbox in the uc1.ascx > > are > > getting lost despite viewstate being enabled as true. > > > > What is going on? > > > > The imagebutton looks like this: > > > > Private Sub imgShasTab_Click(ByVal sender As System.Object, ByVal e > > As > > System.Web.UI.ImageClickEventArgs) Handles imgShasTab.Click > > Response.Redirect("~/advanced/default.aspx?pageID=shas") > > End Sub > > Using Response.Redirect causes all viewstate to be lost. > With Redirect, you call the page as if it is the first time. > > I suggest you omit the Response.Redirect, and do the swapping in > imgShasTab_Click . > > -- > > Jos > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: john walsh |
last post by:
as the subject reads...
if you fill an asp.net listbox with items from javascript
and then submit the form, even if the listbox's
enableviewstate is set to true, it will not retain the
items...
|
by: Dominic |
last post by:
My question is about how to maintain view state in mobile ASP.NET
across postback / request in a web farm environment.
First of all, let's assume the web-farm does NOT use stick-session
feature....
|
by: sonic |
last post by:
Hi,
I am experimenting with different viewstate management ideas for large
datagrids, and found a microsoft suggestion to turn it off, and only
store relevant information by manually accessing...
|
by: RCS |
last post by:
I have an app that I have different "sections" that I want to switch back
and forth from, all while having the server maintain viewstate for each
page. In other words, when I am on Page1.aspx and...
|
by: Abhilash |
last post by:
Hi,
I have the following requirement but i am not sure how to tackle it.
I have two sever controls called Editor1 and Editor2 that contains a
text box with enableview state = true.
Based on...
|
by: Subzizo |
last post by:
i have a template field in a gridview,i modified the edititem template for a
field to represent a dropdownlist instead of the textbox,i need to make set
of server side code when the user changes...
|
by: amolfarkade |
last post by:
Hi,
I am using the user control inside the repeater control which is having dropdownlist controls but while post back i need to bind the repeater every time so i can not take the selected of...
|
by: jeffstl |
last post by:
New to asp.net.....so far Im not sure exactly how to use the ispostback and if that is even related to what I'm trying to do.
I have a datagrid which I have populated on page_load.
I have a...
|
by: bgernon |
last post by:
I have a table that consists of two rows with three cells each row. The cells contain textboxes. I am able to successfully add a new row with textboxes when a button is clicked. The problem is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |