controls

Grouping Controls ASP.NET

Hi All, I have a question. Let's say I had a number of controls which when I click "Add" the same group of controls would display again. For example my grouped controls would look like this: First Name: TEXTBOX Last Name: TEXTBOX ADD When ADD is clicked an additional 2 textboxes appear. So on my page I'd have the following: First ...

Why does the asp.net head control mangle link elements?

Suppose I have the following markup in a standard ASP.NET 2.0 web form: <head runat="server"> <title>My Snazzy Page</title> <link type="text/css" href="<%= PathUtilities.AssetPath %>/css/page.css" rel="stylesheet" /> <script type="text/javascript" src="<%=PathUtilities.AssetPath %>/lib/jquery/1.4.2/jquery.min.js"></script> <...

How to name and find dynamically created webcontrols in c#

I am trying to add a unique name to each textbox that I'm adding to a table. I've tried: TableRow someRow = new TableRow(); TableCell someCell = new TableCell(); TextBox someTextbox = new TextBox(); someTextbox.Attributes.Remove("name"); someTextbox.Attributes.Add("name",itsId); someCell.Controls.Add(someTextBox); someRow.Cells.Add(s...

WPF: Handle editable hierarchical data / TreeView~DataGrid hybrid

I am looking for a WPF control which is a hybrid of TreeView and DataGrid, something like the Visual Studio debugger or QuickBooks contacts list etc. Any other solution on how to handle editable hierarchical data in WPF will be very welcommed as well. ...

How to use ColumnName in GridView control to hide some columns

I want to hide few columns of a gridview before they gets displayed. I want to do it by create a common function which can be used by multiple controls. I am using an extension and would like to know how it can be done. Here is my code protected void btnStandardView_Click(object sender, EventArgs e) { _viewTypeDl = new ViewTypeDL()...

Dynamic Variable Name Use in C# for WinForms

Not sure what is the best way to word this, but I am wondering if a dynamic variable name access can be done in C# (3.5). Here is the code I am currently looking to "smarten up" or make more elegant with a loop. private void frmFilter_Load(object sender, EventArgs e) { chkCategory1.Text = categories[0]; chkCateg...

How to use linq to object to hide or show some control in asp.net page

I am creating a function to hide all the gridview controls except the control whose name is being passed in the function. Here this.Controls referes to controls present in the page (At compilation error is thrown although). I want to fetch all the controls of type GridView with Name property not equal to the one passed in the funtion. ...

How to handle a lot of controls on a Form?

I am wondering how to handle a Form with a lot of controls. Do you stuff all of the handling code into the Form? This is how I have been doing it, but my most recent project is getting out of hand because of all of the controls that I need to work with. I have menus, multiple toolbars, tabcontrols filled with controls, statusbar, ... ...

Free third party ASP.NET control collections?

Hi, Having used DevExpress and the like for several projects for clients, I am wondering if there is a community maintained collection of controls comparable to the DevExpress, Telerik et al collections for ASP.NET? Any thoughts? Regards Moo ...

[WPF] moving multiple controls

Hi I need to move a multiple textboxes with a mouse cursor. I decided that I do it that way. If a textbox is clicked (and Control button is pressed) textbox is added to list of selected items. Then when button is still pressed and when mouse moves I do an operation of moving controls. However my code doesn't work well. Textboxes are movi...

Databinding multiple controls to a single LINQ query

I have a LINQ query I wish to run and drop the result into a var or IQueryable. However, I'm binding the result to multiple (4 to 10) controls and only want the query to run once. When I just put the result into all the datasource values, the query runs for every control and the controls (comboboxes, for example), change selectedvalue...

best way to find webcontrols quickly

Request.Form[key] has a hashtable-like interface, but I doubt that's how it works. Is there a hashing mechanism for the current Page control set? How would one pass along a hashed set of all controls between postbacks? ...

C++\Win32 API - Load controls at run-time from xml

Is there a library that can load controls (buttons, text boxes, etc.) from an xml file? Kind of like in WPF. ...

Automate a graph(graphical object control) in testing C#

I need to write a class to handle the graph histogram. We will be displayed three curves which will have 3 distinct colors. The issue now im facing is tat when the curves overlap each other at a certain point say starting point, ill not be able to pick the co-ordinates of tat curve. The control of the curves is of Graphical objects. Wil...

ASP.NET DataList for a single item

Context: In an ASP.NET application, I need the behavior of the ItemTemplate / EditItemTemplate that the DataList control provides. However, I only need one item in my control, which makes the DataList seems like overkill. Question: Is there a control in ASP.NET made to store a single item that has the template content behavior of the D...

How to create CheckedListBox in DataGridView in winform. Link provided for referece

How to use CheckedListBox control in DataGridView Control in Windows Forms. These are under the namespace. System.Windows.Forms.CheckedListBox and System.Windows.Forms.DataGridView Is it possible. A code snippet will be a great help EDIT I need an help on this link that I found. I hope this might work. But I am more interested on ho...

c# User Control Navigation

I am making a c# windows app that has one MainForm and many User Controls (LoginPage, HomePage, MyListPage, etc.) embedded inside it. I am using Visual Studio 2005 to design the GUI. In MainForm's constructor I do: Controls.Add(new LoginPage()); Controls.Add(new HomePage()); Controls.Add(new MyListPage()); ... LoginPage.show(); But ...

.NET Dynamically Get Control By Name

I need to create a .NET control (in ASP.NET) from a string that represents the control's name. Control myList = SomeSystemClass.GetControlByName("DropDownList"); I guess there is some reflection method in the .NET platform that allows this but I have no idea which one. Any ideas? ...

Silverlight 3.0 Slider Move in increments of N

I was wondering if anybody knows how to move the slider in increments of 50 or more. 0 - 50 - 100 - 150 - 200 ETC.... I'm implementing a slider to filter some grid results. <Slider x:Name="PointsSlider" Width="350" Height="Auto" ValueChanged="PointsSlider_ValueChanged" Minimum="25" Maximum="3000" LargeC...

Separate CSS file for ASP.NET web server control

I have a my own custom web server control. I created separate CSS file with CSS classes description for this control. I do not want to add tag to all pages where it is used. So, I believe that there is any way to connect CSS file directly to control. Is there any way to do it? And what is the best method to add styles to web server cu...