servercontrols

Excel like server side control for ASP.NET

We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid :/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I thought I'd do a bit of searching nonetheless. I've found a couple ...

Change Text Box Color using Required Field Validator. No Extender Controls Please

I need to change color of TextBox whenever its required field validator is fired on Clicking the Submit button ...

What is the proper way to maintain state in a custom server control?

This works, but is it the proper way to do it??? I have a custom server control that has an [input] box on it. I want it to kinda mimic the ASP.NET TextBox, but not completely. When the textbox is rendered i have a javascript that allows users to select values that are then placed in that input box. I have a public text property on t...

Best Server Control for surrounding blocks

I am wondering what server control people generally use for surrounding and separating blocks of related controls and content in a Web Forms scenario. Often times I need to surround a block of HTML and related Server controls with a 'panel' that I can show or hide based upon some UI logic in the code behind. I am usually faced with eit...

ASP.Net web server control that generates HTML and Excel

I am developing a web application that contains a great deal of reporting. The reports are fairly basic, but some have multiple datasets or embedded charts. One of the key requirements is that each report can be exported to Excel. The Excel version of the report is disconnected and should look the same (or very similar) to the web rep...

Creating custom server control to accept user input

Hello, I am trying to build a server control that, depending on a "QuestionTypeId" display either a text box, date picker or Yes-No radio buttons. I have my control displaying how I want it to, but when the submit button is pressed on the form, the text box, date picker or radio buttons that were generated in the RenderContents method...

Server Controls and View State

Ok time to show my complete lack of knowladge for all things web forms but here goes. I am extending the Panel control and OnPreRender sticking some additional controls inside of it (lets just say 1 textbox for simplicity). From here I am just letting the Panels Render method do its thing. The issue I am having is that obviously every ...

How do I make my ASP.NET server control take an embedded code block as a property value?

I have a custom server control with a property of Title. When using the control, I'd like to set the value of the title in the aspx page like so: <cc1:customControl runat="server" Title='<%= PagePropertyValue%>' > more content </cc1:customControl> When I do this, however, I am getting the exact String <%= PagePropertyValue%> being di...

ASP.NET Control to HTML tag equivalent

I'm looking for a cheat sheet that will allow me to show an HTML designer the equivalent asp.net controls for standard HTML tags. As an example the <asp:Panel> will render as an HTML <div> and an <asp:Label> will render as an HTML <span>. I've been googling this to no avail. Can someone post a link to a good cheat sheet so that the de...

internet explorer cannot open the internet site

I have weird error, but that only appears to be happening in IE6, and it happens randomly. I’m implementing omniture analytics on my company’s site. I made a literal server control and called it from inside an update panel. All the control does is build the java script and uses ScriptManager.RegisterStartupScript(Control, Type, String, S...

Using HtmlTextWriter to Render Server Controls?

I'm writing the RenderContents() method of my ASP.NET server control. The method uses an HtmlTextWriter object to render the output content. For the control I'm writing, using the HtmlTextWriter's methods seems like it will require a lot of lines of code to open and close every tag and add every attribute to the stream. In the end I feel...

More information about Custom Webcontrols?

Where I currently work we use a lot of hand made custom web controls for things like dropdown lists, auto-complete boxes, etc. and while I have added things to these controls I never really felt like I completely understood what the heck I was doing. So, my question, are there any good books out there that might help me understand / bu...

Using an ASP.NET server control in a sql server 2005 reporting .rdl file

How would I embed a ASP.NET server control on a SQL Server 2005 Reporting file (.rdl)? I am using the design view to accomplish my task? ...

ASP.net weekly schedule control

Can anyone recommend a free asp.net control that I can use for the following: Weekdays Monday-Saturday along the top row Time of day along left hand side Template fields for the actual data Databindable Cells span the rows based on the start time and end time Here is a control that I found that is pretty good, but I am trying to find...

Alternatives to server controls in MVC

What is the replacement for a server control in ASP.NET MVC? What I want to do is to create a declarative and imperative binding so I can write <cc1:MyControl Header="Some Header" Content="Some Content" /> which would mean that an instance of the MyControl class will be created and possibly rendered to <h1>Some Header</h1> <p>Content...

ASP.Net server control complex "properties"

I am going to aplogize in advance because I am really at the limits of my understanding on this so if I do not explain this well....well sorry... Anyway I am trying to create an asp.net server control that has complex properties which can be set using intellisense. So as an example I will use cars, so the server control might be called ...

How to create ASP.NET user/server control that uses a list of asp:ListItem as child controls?

I am looking to create a user/server control that will be created with something like the following: <my:MyListControl runat="server"> <asp:ListItem Text="Test1" Value="Test1" /> <asp:ListItem Text="Test2" Value="Test2" /> </my:MyListControl> I am just looking for a start here: Articles or code samples. What base class should I...

How to tell the Visual Studio Designer to localize my custom server control?

Hi, I'm currently working on a custom server control. Now I came to the end of developing it and everything runs smoothly. I now just checked that also localization works fine and discovered that the Visual Studio designer doesn't add the meta:resourcekey="buttonNameResource" to my control. The localization works if I add the meta:resou...

Attach RequiredValidator on custom server control rendering a TextBox

Hi, I don't know whether this is really possible, but I'm trying my best. If I have a (complex) custom server control which (beside other controls) renders a TextBox on the UI. When placing the server control on a page, would it be possible to attach a RequiredField validator to that server control, such that the validator validates th...

How to access server controls like a textbox from an external .js file using J-query?

I need to change the height of a textbox using J-query. I need to write this code in an external .js file. How do I access textbox height in J-query in the external .js file? ...