webcontrols

ASP CompositeControl & ScriptManager

I'm really new to the WebControl / CompositeControl world, and I have a small test class I am playing with. It's just a LinkButton that updates when clicked. Things work great when I leave it out of UpdatePanel. But when I try to run it inside I still get a full page POST response. How can I make this class work inside a UpdatePanel? H...

Can't prevent CheckBoxList control from overflowing

Hi <div> element with fixed width contains CheckboxList control. Since ListItems can be added by users to this control, there’s a possibility that particular ListItem could overflow parent <div> due to having too large text. I’ve tried preventing this by setting overflow property: <asp:CheckBoxList ID="chkAllRoles" style="overflow:hidd...

HTML controls in VisualStudio.net

What is the purpose of providing HTML controls with VS.net? Why would someone choose to use HTML controls over .net web server controls? ...

C# asp.net: How to remove span tag from WebControl when rendered.

When using an asp.net CheckBox (and in out case, inherited from a CheckBox) it renders a span around the checkbox input control, this span control is affecting jQuery scripts. Is it possible to remove this span when rendering? ...

getting a value of selected radiobutton in LoadViewState

can i get a value of a selected radio button in LoadViewState event of the the WebControl and how? All the components are generated in codebehind, so i have those controls: RadioButtonList rbl; ListItem liOne; ListItem liTwo; at the moment i am stuck at that the overriden LoadViewState is not being invoked protected override void Loa...

Custom CssClass property: integrate classes with IDE

I've created a custom WebControl that acts as a container and has a text header. The CssClass property applies to the container portion, and I've also added a HeaderCssClass property. How do I get Visual Studio to recognize it's a CSS value so the Intellisense will display available classes? I'm guessing there's an attribute I can apply ...

How to mock ASP.NET 3.5 to unit test my web controls?

I want to mock ASP.NET 3.5 behavior in order to unit test my WebControls: I want to test how they perform with mock data with existing system of events. Basically I want to test generated result HTML based on input mock data. How to do it? I looked into NMock, but it doesn't suit my needs for 2 reasons: It just runs ASP.NET server in...

reading values from dynamically created Webcontrol

I have a Webcontrol, that I create completely dynamically and it contains radiobuttonList. How can I acces this radibuttonlist values, on pages where I register this control? public class MyControl: WebControl pnContainer = new Panel(); rbl = new RadioButtonList(); liResume = new ListItem("Resume", "Resume"); liReopen = new Lis...

Asp.Net Custom Control design time question

I'm developing a set of custom controls, one of them are the "parent", any others must be added inside an ITemplate property of this parent. But in the page, at design time, I can see, by intellisense, the other controls at page level, and I can theorically add them everywhere. I want to emulate the behaviour of the asp:Table and the ...

How to integrate an external web ASP.NET control into a SharePoint application's page?

How to integrate an external web ASP.NET control into a SharePoint application's page? ...

Forcing controls to contain only certain elements, such as ContentTemplate

Ok, my team has been having issues with the ajaxToolkit Tabs control, it doesn't play nice with parts of our site (mainly jquery issues, some other javascript, too many things to change) So, I plan to write a different control that uses jQuery to achieve the tabbing functionality: I've done this before, and the jQuery is almost trivial....

How to open a webcontrol's link using the default browser?

Hi All, I have a webctrl in a dialog. And whenever there's a URL input, it turns to hyperlink and becomes clickable which is fine. My problem is, let's say I have Opera as my default browser, when the link is opened, the browser it uses is IE, so it opens another window. Is there any way that the link be opened using the default browse...

MFC : How to capture a link click event in a web browser control?

Hi All, I have an MFC application that has a webcontrol. When clickable links are clicked, it opens using IE, not the default browser. Questions : Is there a way to force it to open using the default browser? If not, how do I capture the Link Click event so I could just manipulate the click event later? Thanks... ...

How can I detect if the design-time value of a web control property has been changed at runtime?

I'm creating a basic asp.net webcontrol that will have a property that can be set at design-time in the HTML and changed at runtime in the code. I'd like to only have the value of the property saved in ViewState if it is set at runtime and is different than the original value that was set at design-time. If the value is never changed at ...

How to move ASP.NET PlaceHolder control from Page controls collection to a custom Control's output?

I am writing an ASP.NET custom control. In my custom control code, I find a PlaceHolder control in the page like so: this.myPlaceholder = Page.FindControl("placeholder1") as PlaceHolder; Then, I render the placeholder as the output of the custom control: protected override void Render(HtmlTextWriter output) { if (this.myPlacehol...

Can't access instance of custom inherited webcontrol from code-behind page in Web Application project

I've inherited from an ASP.NET WebControl to add some additional functionality. I tested my control in a blank ASP.NET Web Site (created through File > New Web Site...) and it worked fine. But I can't get it to work when I add it to a Web Application Project (created throgh File > New Project... > Visual Basic > Web > ASP.NET Web Appli...

Open Source ASP.NET Controls Library

We are looking for a ASP.NET Rich Controls Library. We don't have much budget to spend. We are looking for a decent choice which give a rich feeling to our application, works and reliable. What are the best available options on ASP.NET Controls Library which are free and has good support online? Thanks. ...

Best mechanism to have rich form controls on web page (HTML) equivalent to windows forms.

Hello. I am working towards porting a windows application to web. The windows application is quite rich w.r.t. the form controls, complex validations and user interactivity. Basic web forms are inadequate to meet these complexities. So I would like to know the best way to still have the richness on the web pages. I have some ideas and w...

Deserializing to create WebControls?

I'm trying to use an XML definition to describe a form. I'd like to use the XmlSerializer to Deserialize a file to create custom WebControls. However, it looks like I'm getting a namespace conflict: when I make my class inherit from Control, I get "The XML element 'EnableTheming' from namespace '' is already present in the current scop...

Question about asp.net event handling

what is the difference between <asp:DropDownList ID="Combo" OnSelectedIndexChanged="Change" AutoPostBack="True" runat="server"/> and <asp:DropDownList ID="Combo" SelectedIndexChanged="Change" AutoPostBack="True" runat="server"/> ? And is the attribute AutoPostBack="True" always required? Iam asking because it seems my OnSelected...