Multi-select dropdown list in ASP.NET
Do any good multi-select dropdownlist with checkboxes (webcontrol) exist for asp.net? Thanks a lot ...
Do any good multi-select dropdownlist with checkboxes (webcontrol) exist for asp.net? Thanks a lot ...
I'm trying to create a function that searches up a WebControl's parent-child relationship (basically the opposite of WebControl.FindControl(id as String), but looking for a specific WebControl type). Example: I have a user control in an ItemTemplate for a GridViewRow. I'm trying to reference the GridViewRow from the user control. The ...
I am trying to use a label in my datarepeater, when I am able to bind data and write to me html page. <asp:Label ID="lblID" runat="server"><%# DataBinder.Eval(Container.DataItem, "ID")%></asp:Label> which works fine. When I try to get text value I get "". Label lblcurrentID = ri.FindControl("lblID") as Label; result: lblcurrentID....
Okay, I think I'm just making a stupid mistake here, but I want to create a Control (derived from System.Web.UI.Control) that is collapsible, using the good ol' ASP.net ViewState/PostBack model. I have an ImageButton in my class, which I initialize in the OnInit() Event: private ImageButton _collapseImage; protected override vo...
I'm trying to add an attribute to a SharePoint web control: Microsoft.SharePoint.WebControls.BooleanField which basically renders as an html input checkbox control. How do I add an attribute to this? such as an event? Normally for an asp.net web control, you can just do: sampleControl.Attributes.Add("onclick", "alert('test');"); An...
<ItemTemplate> <asp:Label runat="server"><%#DataBinder.Eval(Container.DataItem, "Question")%></asp:Label> <asp:DropDownList runat="server" id="<%#DataBinder.Eval(Container.DataItem, "QuestionID")%>">> <asp:ListItem value="1" text="Yes" /> <asp:ListItem value="0" text="No" /> </asp:DropDownList> <ItemTemplate> ...
This is the repeater: <asp:Repeater ID="rptrReports" runat="server"> <ItemTemplate> <div style="margin: 2"> <asp:Label ID="lblAccount" runat="server" Text='<%#Eval("Account").FullName%>' /> <asp:TextBox ID="txtDescription" runat="server" MaxLength="256" Text='<%#...
If I drop a System.Web.UI.WebControls.Login onto a page, should it redirect to the ReturnURL by default? Or do I have to set some config settings or write some code to make this work? ...
I have developed a server control inherited from WebControl that wraps any number of child controls and changes their output. The control class is very simple and only contains the RenderContents method. Here is an example of how it has been placed on the page. (Not included: registration of control namespaces.) The intention here is th...
Is it possible in ASP.NET to dynamically load up a WebControl from a string with some tag contents in it (without writing a bunch of custom code)? For instance, I have a string like the following: string controlTag = "<asp:Label ID=\"lblLabel\" runat=\"server\" />"; I then want to do something like the following to load up the contro...
how can i change the css attribute value at runtime like all h1 color="blue" and all p color="green". if anyone know it please help me! ...
Hi there. I'm making a forms framework for a project, and have found that when trying to programmatically set the AssociatedControlID property of the asp:Label to its associated TextBox, I have to call ClientID to get ID to populate (not be null). While debugging, this use of the intermediate window shows the issue: _inputTextBox.ID n...
I am trying to check all the checkboxes on a webform (aspx) page, which is inside a master page, depending on the ID of the checkbox. The checkboxes are created dynamically, so I only know the prefix for finding it. So, I need to find these checkboxes by iterating the controls on the page somehow. It's not working out. Any help would ...
It's been a while since I've created a new ASP.NET web application. (I've been doing ASP.NET MVC for the last 9 months, and hadn't done an ASP.NET site for about a year before that.) Now I've created a new regular ASP.NET app and when I look at the Default.aspx file, Visual Studio is only displaying the HTML tab in the Toolbox. I don't h...
This is for ASP.NET. Think about the multiview control. It has 1 to many view controls. Each view control has the ability of holding controls, but, yet, only one view is visible at a time. Keeping that in mind, I'm thinking I want to "tell" the non-visible views to NOT LOAD, therefore, NOT LOADING the child controls. In my sample, duri...
I have a User Control with form items that is re-used considerably throughout a large web application, and up until this point the validation summary upon an invalid form submission is being handled by the .aspx that consumes the User Control. Now I need to set the ValidationGroup property at runtime for each of my form items controls (...
Are ASCXs still used in ASP.NET MVC or should we be using something else? ...
I am trying to add a chart control to my .aspx page, but am getting the following error: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). with this code: protected void Page_Init(object sender, EventArgs e) { if (Context.Items.Contains("ajaxChart")) { ajaxChart = (bool) Cont...
Hello! I have been looking around on the web and found some articles about the topic, but i still can't figure out the difference between them. I have the code show below, if i inherit from a CompositeControl it works perfectly but not if i inherit from a WebControl. (They both render the code, but only the CompositeControl handles the ...
Hi All, well it's kinda a newbie question but i think lots of people have problem with that. I'm developing windows\web application for fun, and install them at friends places. most of my developing concentrates on CRM system. but I've a big problem with Showing data from DB in better, effective, lighter ways. using microsoft built-in we...