controls

Does disabling a .NET control prevent it from posting back

I have a custom made ASP control which is based on a select (drop down menu). If I disable my control by adding the word "disabled" in its html, I start getting null pointer errors when processing the form data. I figure, either the browser doesn't post back disabled form items or ASP.NET ignores them when processing the form data. I'...

HTML Radio buttons styled as Toggle Buttons

Instead of having the typical disks with labels to the right, I want the options to be presented as clickable buttons. The selected option should appear to be pushed or pressed in. I want to do this in HTML, but an example of this are the top left buttons in the program Audacity where you select the cursor/tool mode. What's the best w...

What's the "right" way to isolate control dependencies

I've made it a personal rule to inherit every UI control before using it. In a previous life I'd always considered this one of the less useful things you could do because the justification always seemed to be "I might want to change the font on all the buttons at once"... a motivation that never paid off... once... ever. Two recent pro...

.Net PropertyGrid DropDownList - return value different from show value

I want to be able to show in a propertygrid a dropdownlist that show some "string" value but return an "int" value. For example, let set I got this class : public class MyObjectOptions : StringConverter { public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { return true; } public ove...

VS 2005 Web Site Project Template Annoyance.

I recently inherited a project that was done with the "web site project template" (which I hate by the way). I have always worked with the "web application template" which I love. I'm perplexed by something that I found in the project though. There is custom control instances throughout all the pages like this: <cc1:MarketingItem runat=...

jQuery and ASP.NET names

What is the correct way to get a control that was rendered by ASP.NET with jQuery? Example: I have a checkbox that was generated like this: <input id="ctl00_Content_chkOk" type="checkbox" name="ctl00$Content$chkOk" /> If I want to select it to get if it's checked, I tried this: $('form input[name=chkOk]').attr("checked") and $('c...

Using Other Programmers Custom Controls

I am using Scott Mitchell's textBox Characters and Words counter control, i downloaded it from the website http://www.4guysfromrolla.com/ and unzipped it to my desktop. then in VWD Express 2008, i created a new tab in the Toolbox, i chose the *.dll from the unzipped folder, i used the control, all is fine (try it, i recommend it) but whe...

Detect Changes webform controls asp.net

Hi all, I have a webform with around 20 textboxes/drop down list controls and i would like a clean and simple way of checking to see if the form fields have changed or not. Does anyone know of a clean way to do this? Thanks in advance! ...

MFC CLinkCtrl

How do you use CLinkCtrl? ...

Comparison of available .net controls libraries

Which .net control libraries out there would you recommend as a must have for an enterprise? Can be free/non free Should at least contain a real powerful Datagrid Ajax functionality Are there any comparisons available? ...

When should I manually dispose of controls? How do I know if a control implements IDisposable?

In a previous question about ridding the system tray of an old NotifyIcon I was told that I should Dispose anything that implements IDisposable. Sounds like good practise to me however as a newbie it raises more questions :-) How do I know if a control implements IDisposable? Should I build a class that attempts to dispose everything ...

Control.Refresh() Across Threads

OK, please disregard what has gone before. I'm not getting the errors anymore, so it seems my problem is with getting a Chart to update when I change the values to which the Chart is data bound. //Disregard below here Hi all. I have a WinForms application that has a panel, panel1. A background thread creates some other controls that th...

In ASP.net is it better to use Server Controls within the ASPX page or create them dynamically in the code behind?

I generally prefer to add controls dynamically, like table and generic html controls, to the ASPX page, rather than add them in the ASPX page and set the properties dynamically. Which approach is considered "better practice"? Also is using generic html controls dynamically a better practice than outputting formatted html strings to an ...

Hosting an ASP.NET page as a control within an HTML page?

This sounds like a "why would you do that?" sort of question, but here goes.. I have a very simple ASP.NET page which simply renders out a one column grid of about 10 rows with paging. At the moment, I need (due to some technical restrictions) to essentially host the ASP.NET page within an IFRAME on a basic HTML page. It works of cour...

WPF ways to find controls

I am trying to collect all possible ways to find controls in WPF. To find control by name, by type, etc. ...

How can "default" values in overridden WinForm controls be prevented?

I'm trying to learn and grasp what and how C# does things. I'm historically a Visual Foxpro (VFP) developer, and somewhat spoiled at the years of visual inheritance by creating my own baseline of user controls to be used application wide. In trying to learn the parallels in C#, I am stuck on something. Say I derive my own label contro...

How do I make a marquee progress bar in WPF?

In Winforms I could set the ProgressBarStyle of a progress bar to Marqee, and that would have the progress bar incriment on its own without having to be set, for processes where I don't know how long its going to take, and no good way to report back to the UI. I would like to do the same in WPF, but I can't find a way to pull it off sho...

How do I resize controls on a form to fit different resolutions?

I'm developing a small application that has a few button and labels. On my development PC it fits on the window, but on other machines the controls of forms get smaller. My screen resolution is 1680x1050 and client screen solution is 1024x768. Is it possible to make controls auto fit the screen solution? ...

updateing business object when selected index changes for drop down list with in a data bound control

Hello Friends, I have a repeater, which is bound to a Business Object, containing a textbox (Name) and a DropDownList (Date of Birth). how can i edit the bound object with the selectedvalue from the dropdown? For example The first Object has these values (Name: Dave, DOB: 1982) The second object has these values (Name: Tim, DOB: 1970...

Does the concept of a Control make sense in MVC?

I've started using MVC reccently, and one thing that occurs to me is whether its possible for the concept of a Control to exist in MVC? From what I see the framework allows the application to be nicely factored into Models, Views and Controllers, but I can't think of a nice way to take a "vertical slice" of that application and reuse it...