asp.net

ASP.NET ListView Alternating Groups

The ASP.NET ListView control like most databound ASP.NET controls has an AlternatingItemTemplate which you can use for example to render different css class for odd and even rows. The control also has GroupTemplate which you can use to group items and display for example 3 items in TDs that are grouped in a TR. However there is no altern...

Setting the ControlToValidate on a Validator

I am currently re-writing a dynamic form based on database information. This form contains numerous 'Item Specific' properties, each of which has a single control and label, for example Category has a label that says "Category" and a DropDownList that contains all the options. The problem I now find is that each of these is added to th...

Where is ASP.NET MVC documentation?

The main page (asp.net/mvc) only seems to have a getting started guide and tutorial, plus videos, but I'm not able to find a proper documentation (classes, methods etc). Any link that can help me? Thanks ...

How to determine the class of an ASPX page?

Short of parsing the ASPX page myself, what's the way to determine the class of an ASPX page? In our projects we use Web Projects in VS2008 (instead of Web Sites kind or projects), that gives us a single DLL for the whole site, which is great. Now I need to determine programmatically the class of an ASPX site. I KNOW that the ASPX cla...

RadPanelBar controls dissapear after items added dynamically

Hello ! i've got a question about Telerik RadPanelBar control. For example we've got a RadPanelBar control on form : <telerik:RadPanelBar ID="testPanelBar" runat="server"> </telerik:RadPanelBar> and a button which adds a new item to this RadPanelBar at runtime: RadPanelItem newParentItem = new RadPanelItem(...

Two ASP.NET sites sharing application files but with different web.config

Is it possible using virtual directories and/or virtual applications to set up two web sites that share the same application code (aspx pages etc.) but have different web.config files? The sites and code are residing on the same server running on the same IIS. I am using IIS 6. ...

OracleClient command - best practices around USING and disposing of command

According to the MSDN documentation for the OracleClient.OracleCommand: Public Sub ReadMyData(ByVal connectionString As String) Dim queryString As String = "SELECT EmpNo, DeptNo FROM Scott.Emp" Using connection As New OracleConnection(connectionString) Dim command As New OracleCommand(queryString, connection) con...

Is it possible to change the username with the Membership API

I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of my question is: Should I allow users to change their username after the account is create...

How to align text within a FooterTemplate cell in a GridView

How to align text within a FooterTemplate cell in a GridView I tried the following but the text is still centered (there is a parent center tag): <FooterTemplate> <span style="size:100%; padding:0; text-align: right">Total:&nbsp;</span> </FooterTemplate> ...

C# How to access a dropdownbox in a listview?

I have a listview. In my listview I have a dropdownbox which I want to fill in my codebehind page. Only the thing is, I don't know how to access this webcontrol. The following doesn't work: DropDownList ddl = (DropDownList)lvUserOverview.Controls[0]; I know the index is 0 because the dropdownlist is the only control on the listview (a...

How to set color array into another color arrays?

My below Codes gives me error:"Index was outside the bounds of the array." My Algorithms create Colorset arrays that's arrays dimention '16', But i need Second one 'colorSetLegend' that's dimensions:32 if you look below Bold codes that returns me error. Color[] colorSetLegend = new Color[32]; Color[] colorSet = { Color.Re...

Is it possible to set updatable to true and still request precompiled pages from their assembly?

I had it working earlier today, but now I get the contents of the marker files if I request precompiled pages. The .compiled file and the assembly it refers to are still present in the /bin folder. I would expect that the ASP.NET runtime first checks to see if there is a .compiled file before trying to serve the page directly, but I have...

Serialization Exception in compiled dll

I've inherited an ecommerce ASP.NET (c# code behind) web application. We've recently moved servers and it's proving somewhat troublesome. I have very little experience with IIS server configuration and dealing with large projects like this. Most of the problems have now been fixed, but we're experiencing problems with a crucial part, as ...

Change the default SqlCommand CommandTimeout with configuration rather than recompile?

I am supporting an ASP.Net 3.5 web application and users are experiencing a timeout error after 30 seconds when trying to run a report. Looking around the web it seems it's easy enough to change the timeout in the code, unfortunately I'm not able to access the code and recompile. Is there anyway to configure the default for either the ...

Duplicate Rows when Data Binding with LINQ to Entities

I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView to the results of the following LINQ to entities query. In both cases the grids contain the correct number of rows, but the data from only the first handful of rows is duplicated in all the other rows. I'm directly assigning the return value from this c...

Inject HTML to server control

How do you inject HTML to a server control? I'm creating a calendar control and have some javascript/css that go with it. In addition, I have some html code that gets generated with the proper ClientIDs that work with the JS/CSS and I would like to inject this to where the "server" control is used. For example: <MyUC:UC1 ID="someUC" ...

Get Changed Rows of GridView ASP.Net

How Can I find all the rows that has been changed in gridview. I can not use Ajax in any form ...

ASP.Net Session Sate , Sharepoint, GAC & Bin deployment

Does the same process apply for session state when a dll is placed in the bin as when placed in the GAC? Or is there some type of esoteric change that take place under the hood? I’ve got a test solution deployed to the bin directory of my sharepoint site that uses session state. I made sure that session state is configured in my web.c...

how to assign validators to a button

Hi, Is there any way to assign a group of asp.net validations to validate when a button is clicked? I've got two sections in my site. If one section isn't submitted and the user decides to submit the other, I want to prevent the validation from the first section from firing also. Any suggestions or pointers? Thanks ...

HttpHandler for WMV Files

Hi, I have created a HttpHandler for WMV files. I have also registered it in the web.config. But for some reason it never fires. Let me explain the scenario: I have linked to the videos on a website using the anchor tag. When you click the link the wmv file is run in windows media player. Now, I want that instead of link a media play...