Web Forms :: How To Show/Hide A Table By Using A Checkbox
Apr 22, 2010
I want to make a table visible when a checkbox is ticked and invisible when unchecked, any suggestions?At the moment I have a webform with 1 checkbox and my table which I would like to show/hide.
I have a report page, that displays many rows, each row having its own checkbox with its value being an ID field from the database.This is for a bulk operation, that will be preformed on all the row's where the checkbox was checked.So if the user checks multiple boxes, hits a button, I need to send all the checkbox values to a controller's action that will take those Id's and process them.
I am working on ASP.NET application where I am reusing a user control. The user control contains a checkbox and bunch of other controls. I want to display all the controls inside the user control on all the pages but on one single page I want to hide the checkbox. I was thinking that I can use the databind methods and see if I am on the "pagex" then hide the checkbox.
I want to hide or show a wizard step. Based on the inputs on the prvious page. For example If some one choose "4", the step 4 should be visible. else Step 4 should be hidden. I tried something like this
what is the best way to show/hide controls in .net?
I have a page with many show/hide depending on the control value.
eg. radio button list rbl (dynamically generated from the database values)
based on the radio button list value,will need to show/hide the other controls.
if the value is 1, will need to show or hide dropdownlist1.
if the value is 2, will need to show or hide dropdownlist2.
I tried using the javascript with rbl.Attributes.Add("onChange","return toggleDropdown();")
then in my javascript function i will show/hide the control.
However when I toggle the dropdown for the second time, it became very slow. The first time is okay.
I have also tried using ScriptManager and UpdatePanel (putting the controls inside the UpdatePanel), but it is also very slow when toggling dropdown for the second time onwards, causing the page to hang.
I am in the process of re-developing my website into ASP.NET from a product called LogiXML. My background is in front end design using XHTML, CSS and Javascript with a good understanding of SQL so this is a HUGE leap for me.
In one of my Views I have created an asp data source to count the number of scheduled meetings:
<asp:SqlDataSource ID="CountRS" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand=" SELECT count(*) as countRS FROM WebMeeting_Calendar WHERE MeetingDate > getdate() and MeetingType = 2 "> </asp:SqlDataSource>
Next, I created an asp panel where I wanted to control the "Visible" element by the value returned in the data source but even when using a simple 1 = 0 (to return False) is not working for me.... Basically, if the count of meetings is zero, I don't want the panel to show.
I have a page with a label and a textbox with two button edit and update. when the user clicks on edit the labels get hidden and text box appears. And when he clicks on update the textbox disappears and label appears I have achieved making the text box disappear and label appear but when I click on edit the textbox is not appearing ....
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Institute : System.Web.UI.Page {
Basically I have a dropdownlist (ddlSystem) and an AJAX update panel. Inside the update panel I have an asp:GridView (gvSystemSpecs) and an asp:Image (imgLoad).
For triggers on the update panel I have:
[Code]....
When the user changes ddlSystem it makes a service call to pull back a bunch of data and populate the gridview.
I want to be able to show a loading image (imgLoad) when ddlSystem is changed. Once the function to pull data and populate the gridview is complete I need to hide the loading image.
I think I'll need to use some JavaScript, but what ever I try doesn't work and I don't know if the update panel has anything to do with it...
I am using a ListView to display a list of Products. My DB has a field named productImage. What I want to do is show this row if there is a picture associated with the product, Hide this row is there is no picture associated with the product.So on the Listview_ItemCreated Event I have this:
My issue is, that i only need this to display when my datalist is displayed and has records.. every time else, it needs to be hidden ( Visible = false ) on page_load i have it set to
Should i only be check then within my dropdown event? By default the page is displaying my datalist, so it should be hidden.. then you have a dropdown to make a selection, if you change it, then it should show ONLY if there are records to be displayed.
New users can register on my site by completing a basic form that has the create user wizard control with some additional information i am collecting using a CheckBox List. They can then log in to the site and and view "MypProfilePage.aspx" where I display the information with the CheckBoxList boxes already ticked based their selections which they can update. My problem is I have two levels of User and each one has a different registration form.
Registration Form A Has 20 Items in the CheckBox List
Registration Form B Has 10 items in the CheckBox List
On the Profile Page, I just want to show the CheckBox which is relevant to the Registration form A or B and with selections by the registered user. So therefore the User who registered on B will not be able to see the selections checkbox list for A.
We have a dynamic sitemap and all nodes in the sitemap display a breadcrumb. Is it possible to have the breadcrumb still showing, but make the link in the sitemap invisible or non-clickable? Reason for this is that... we dont want users to select some pages from the sitemap (becasue they need to conduct a search first to populate a datagrid) and clicking on the link will only take them to an empty page. I tried just removing the url, or having a blank title, but that didn't work.
I basically need some items in a grid however each item contains subitems so I need a +/- type button to show/hide them. Is there a control to do this or would it be easier to simply put them in a CSS table and use jquery or something similar to control the hide/show of subitems?
Is there a way to show/hide (visible = true/false) a textbox and/or dropdownlist at PageLoad (or other Page cycle) from codebehind (I would like to check for some permission regarding current user and show/hide some controls from aspx page) ?
Protected Sub SQLDShowActionRef_Selected(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SQLDShowActionRef.Selected
I have a label , textbox ,and dropdownlist,in dropdown i have two items Accepted and Not Acceptedif i choose Not accepted it visible the label and textbox in vb.net.