Here's the scenario:
I have a DataList populated from a datatable sitting inside a
fieldset. Each element (row) in the Datalist has the following child
controls: asp:checkbox, asp:image, asp:labels.
Within the <form>, but outside the fieldset, containing the datatlist,
I have a usercontrol (used to collect search criteria) and some
asp:button controls (used to initiate actions - ie. retrieve db data,
reset user control fields, download data from the datalist).
The design is intended to allow the user to specify some criteria,
retrieve data and populate the datalist. Once the datalist is
populated, the user is allowed to selected 0, 1, or many checkboxes in
the datalist rows.
By clicking the "download" asp:button I wanted to be able to parse the
datalist for checked rows and download the data.
Problem:
Obviously, when the user clicks the asp:button to download the page is
postedback and, though DataList.Enable viewstate=true the datalist data
is lost by the time the asp:button clicked event is handled. The
UserControl (criteria) is persisted in viewstate and is re-loaded on
page_load (no problem there).
I've tried wiring-up, and using, Javascript with the "Onclick" event
of the download asp:button. The Javascript function does fire but the
datalist, and its contents, are no where to be found when I parse the
document.forms( 0)controls.
Question:
I assume that this is something fairly straight-forward to accomplish
but it eludes me. I need to know how to retrieve/persist the datalist
data (including the checkbox states.
TIA
Glenn 1 3331
By way of follow-up...
Apparently my Javascript, to parse the page, could not "see" into the
Fieldset that I was using to contain the asp:Datalist control. Once I
replaced the Fieldset with a <DIV style=...> tag the Javascript worked
just fine!
Now, I guess, I'll parse the Datalist checkboxes with Javascript and
populate a hidden field on the page to capture/persist the selected
Datalist rows.
Glenn This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MrMike |
last post by:
I have a datagrid containing a drop-down-list. The datagrid contains
Edit,Update,Cancel buttons and respective events. Whenever I make a change
to one particular field (a drop-down-list in column3), as soon as I click
UPDATE the original value which existed at load-time replaces the value I
chose. Is this a postback problem, and if so how...
|
by: Frankieboy |
last post by:
I believe I've got a postback problem on our site. The strange thing
is that everything works fine on my developing version, but not on the
production site. I'm wondering if there may be different
..net-frameworks running.
What I can read from the _doPostBack the developer edition is testing
for Microsoft in the _doPostBack-routine, while...
|
by: Vannela |
last post by:
I want to get the status of the checkbox control in the
item template of the DataList in the code behind
Using findcontrol i am not able to get the status of the
checkbox . How shouls i get the status of the checkbox
whether it is checked or not?\
Thank you
|
by: TPS |
last post by:
I have a checkbox column in my datagrid. This checkbox triggers an
autopostback.
When I postback, I need to tell what row the user is on so I can tell what
check box was checked or unchecked.
Can't seem to find that property.
Thanks.
|
by: Daniel Groh |
last post by:
I have two controls in my webform, BUT....one comes from a user control and
the other comes from another user control, both with post back!
How can i work just with one PostBack ?
if(PostPack from button2){ //How can i accomplish that correctly ?
do nothing //Just do with post back of button1
}
Thanks in advance
| |
by: Paperback Writer |
last post by:
I have a DataList with a lot of items where the user can select them trough
the CheckBoxes but i don't have idea how to capture these values from the
checkboxes to insert in my DataBase....How to accomplish that ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
|
by: |
last post by:
Hi all,
I have a bunch of dropdownlists that are populated in client-side
javascript. When i do a postback I get the following error:-
Invalid postback or callback argument. Event validation is enabled using
<pages enableEventValidation="true"/> in configuration or <%@ Page
EnableEventValidation="true" %> in a page. For security...
|
by: gwilliam |
last post by:
Problem with checkboxes in webpages. I am trying to re-set the values
of dinamically created checkboxes in a web page, but no matter what I
try the "Checked" property is not set correctly.
A control on the page does a PostBack which in turn calls the following
code:
strSQL = "usp_TradeShow_GetAllAttendeeClasses_Sel " &...
|
by: rrayfield |
last post by:
I create a datalist from a datatable that is created in code on the page. I have all of my values assigned to dropdowns and labels inside the DL and it runs through them.
Everything works great
BUT
I have added a checkbox to Datalist and now want to set visable= false to the items in the datalist of the checkbox is check (on post back of...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |