asp.net

c# and Date Culture Problems

I've written a asp.net app and one of my postback routines simply saves user submitted form data to a sql 2005 db. All runs great on my development machine but when I deploy to the live site I'm getting invalid dates from my parse date checker. Basically it is expecting an american date format on the live machine but this is not what I...

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? ...

SPGridview single DataKeyName instead for multiple?

I have a SPgridview in a webpart. And i want to get the ID of the item, not the index, when i select a row. How do i do that? Normally i would just set the DataKeyName of the gridview to "ID" or whatever the column in the table is called. But here im not allowed to set a single datakeyname, only multiple with a stringArray.. I tried s...

Howto make RequiredFieldValidator change the css class of the parent div

I have a TextBox input element that has a RequiredFieldValidator as such: <div> <label>First name</label> <asp:RequiredFieldValidator ID="RequiredFieldValidatorFirstname" runat="server" ErrorMessage="Required" ControlToValidate="TextBoxFirstname"></asp:RequiredFieldValidator> <asp:TextBox ID="TextBoxFirstname" runat="server"...

How to implement localization in web.sitemap

Can you explain how to implement localization in web.sitemap please? ...

Can I databind (2-way) dynamically generated RadioButtonLists?

I am trying to create a dynamic survey page. The idea seems simple, but trying to implement it in ASP.NET is getting me very frustrated... Each user is linked to an individual list of (multiple-choice) questions. I have the following data tables: Surveys: User | Question | Rank -------+------------+----- user-x | question-x | 1...

Access TimeZoneInfo from SQL 2005 Server

The .NET TimeZoneInfo class is great and I thought it would answer all my issues with recording data from multiple time zones in my SQL 2005 database. To convert a UTC datetime in the database to any other time zone i'd just get the time zone into a TimeZoneInfo class using TimeZoneInfo.FindSystemTimeZoneById() and then call the TimeZon...

ADSI / IIS management and ASP.NET impersonation

I'm in the process of writing a small web app that would allow me to manage several IIS installations on different servers on our network. We have no domain controller. I have written a small impersonation controller that uses the win32 api and its LogonUser method. I then use System.DirectoryServices and the IIS ADSI provider to create...

Determine when Postback occurs because of a textbox being changed

I've got a usercontrol that has a <asp:TextBox> with autopostback set to true. When the user types text in and moves off the textbox, asp.net fires a postback event. However, it isn't handled specifically by the textbox, but is instead simply a postback - the page_load fires and then life goes on. What I need is a way to know that this ...

Repeat ASP.NET Controls without Databinding

I have an ASP.NET page that requires the ability to have users enter multiple records. What I would like is to display a collection of textboxes with an add button below. Each time a user clicks the add button, a new, identical collection of textboxes will be added to the page. Then, when the user clicks submit, each collection of tex...

Totally Dynamic Form Creation: MVC or WebForms?

I'll start a new project, that will include forms whose inputs and their types (textbox, checkbox etc), Validation rules are defined in DB. I have to choose one of the frameworks for Form Creation, Form Validation, Edit/Insert Forms but I'm stuck. I doubt MVC will make handling Parent-Child relationship for Controls difficult. And altho...

PDF wrong error in IE6 and IE7 with https

Response.Write("<script language=\"javascript\">window.open( with https and pdf What we do in a Asp.Net 1.1.4332 application is the following: a button triggers a server event that does some processing and puts the data in a session object after that the following code is executed : string page = Request.ApplicationPath + "/ApkRappor...

What is the difference between Public, Private, Protected, and Nothing?

All my college years I have been using public, and would like to know the difference between public, private, and protected? Also what does static do as opposed to having nothing? ...

How do I save the state of the treeview nodes (expanded/collapsed) between postbacks?

DUPE http://stackoverflow.com/questions/516192/c-treeview-state-expanded See above... ...

Whats the best, most simple ajax file uploader?

I have asp.net 3.5 website, and i want to put an ajax uploader, but i want this ajax uploader to: don't refresh the page while/after uploading easy to integrate free Not swf upload control i will use it in uploading images, so want a simple way to get the uploaded image file name, and be able to tell it in which folder to upload to. ...

CascadingDropDown Error - 'options' is null or not an object

I have five DropDownLists linked together with the CascadingDropDown AJAX control. When it's running locally, they work fine. However when running on the production server over the internet, I get this error every time I select a new item: 'options' is null or not an object Debugging this shows the function that's causing it (it's JS ...

Log4Net: Rolling File appender, define extension

Hi, I want my logfile to look something like this: 2009-02-13.log but the problem is that I can't seem to find any way to add the .log extension. I've tried a lot of things but nothing helps. This is what I have this far: <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="Logs/Log4Net/...

How to make a big query on an ASP.NET page for an Oracle DB

I have an Oracle DB, and an ASP Page that has many ListBoxes and DropDownLists. These controls make the user input data to get filtered results on the next page. Once the user clicks search, a string (query) is generated based on the selections of the user. The results page has a datagrid that takes this string and uses it to get data f...

Two ModalPopupExtenders on a page cause incorrect validation issues

I have one aspx page that has two UserControls on it; each is primarily a ModalPopupExtender. One has validators; one does not. The one that does not has a Submit button with the CausesValidation="false" attribute on it. When that Submit button is clicked, nothing happens. Click it again, and the postback happens as expected. There ...

Asp.net Master Page control dynamically through code behind

I am having 2 Master Pages and I want to Switch Master page depending on the site, so I want to handle switching the master in code behind. ...