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

Working with repeaters without Viewstate

Hi,

I am working on an Asp.net 2.0 web application that uses master pages,
according to our application architecture we should not use Viewstate. Is
there a work around to raise the events fired from the child controls of
repeater when viewstate is disabled?

The scenario is as follows
I have a web page with a repeater that has controls on it, The viewstate is
disabled. The repeater is data bound to an arraylist in the page_load
event(in block if !ISPostback), so when the user requests the page for the
first time the repeater is populated. There is a button in the repeater
which is used to add another row. When this button is clicked the event will
not be fired on the server on postback. this is because the repeater itself
is databound in the page load when its not Postback.

This works fine if we enable viestate, does any one know whether there is a
work around for this? any help is highly appreciated

Thank you
Vj

Jul 4 '07 #1
2 1908
You can do it with a bit of client-side programming. Handle client-side
onclick event for the buttons to make a javascript call myForm.submit().

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Vijay" <te*******@peoplewareindia.comwrote in message
news:60**********************************@microsof t.com...
Hi,

I am working on an Asp.net 2.0 web application that uses master pages,
according to our application architecture we should not use Viewstate. Is
there a work around to raise the events fired from the child controls of
repeater when viewstate is disabled?

The scenario is as follows
I have a web page with a repeater that has controls on it, The viewstate
is
disabled. The repeater is data bound to an arraylist in the page_load
event(in block if !ISPostback), so when the user requests the page for the
first time the repeater is populated. There is a button in the repeater
which is used to add another row. When this button is clicked the event
will
not be fired on the server on postback. this is because the repeater
itself
is databound in the page load when its not Postback.

This works fine if we enable viestate, does any one know whether there is
a
work around for this? any help is highly appreciated

Thank you
Vj

Jul 4 '07 #2
Hello Vijay,

VI am working on an Asp.net 2.0 web application that uses master
Vpages, according to our application architecture we should not use
VViewstate. Is there a work around to raise the events fired from the
Vchild controls of repeater when viewstate is disabled?

What if to use the ControlState to keep the info there, or it's the behaviour
by design not keep any client info?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Jul 5 '07 #3

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

Similar topics

3
by: DonRex | last post by:
Hello all! I couldn't find a web application-newsgroup for ASP.NET, so I'm sorry if this is the wrong forum! Synopsis: In my webform I have 3 nested repeaters: rpWeeks ----- rpTime
0
by: Machi | last post by:
let say in parent-child scenerio (Product: Product Category - one product category may has many products), i am using nested repeaters where parent repeater will be used to display info and child...
2
by: Ryan Ternier | last post by:
I'm playing around with Cache and Viewstate. I've made a small little example that reminds me of grade 12: if(!IsPostBack) { ArrayList alTest = new ArrayList(); alTest.Add("This is from...
1
by: garethdjames | last post by:
Please can some on offer some practicle advice, I am designing a page that displays details about a product, the page will be navigated from a datagrid (this bit no problem), The details page...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
12
by: Adam Sandler | last post by:
Hi all, I hope this is an easy one... Using VWD 2005. When I call my accessor method (getName) I always receive an empty string back. Debugging shows there should be something there but I...
2
by: Josh | last post by:
I have a nested repeater situation with a Link Button on the nested repeater. However when the link button is clicked I get a postback but the event never takes place. I'm trying to wire up the...
1
PrinsonG
by: PrinsonG | last post by:
My Query is How do I export to excel/csv using Nested Repeaters. My project is web-based and i am using C#.Net. In this i use three repeaters. one displays ID, Name of the user. second...
1
by: andrew.douglas11 | last post by:
Hello all, Is it possible to share controls inside a child repeater? Here's the situation: I have a web page that needs to display data grouped by A, and alternatively by B (only one grouping...
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: 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...
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,...
0
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...
0
tracyyun
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 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.