asp.net

static class instances unique to a request or a server in ASP.NET?

public sealed class UserLoginSingleton { UserLoginCollection _userLoginCol = new UserLoginCollection(); UserLoginSingleton() { } public static UserLoginSingleton Instance { get { IDictionary items = HttpContext.Current.Items; if (!items.Contains("TheInstance")) ...

Architecture for an Auction Style Site

Where would be a good place to find information on the underlying architecture for auction style sites? Preferably in ASP.Net. ...

ASP.net: Weird web user control problem

This is weird. I declare a web user control on a asp.net web page like so print("<%@ Register Src="~/Controls/blah.ascx" TagName="blahCtrl" TagPrefix="cc" %>"); I don't have problem with it until today in the code behind where it give me name blah is not declared error. does anyone know what cause this? ...

Passing Values between Web User Controls

Hi, I've several web user controls on my asp.net page and I wanna pass values between them. For example : There is a dropDownList in one of them and when user selects any item from dropDownList, it can pass the selected value to the other user control which includes GridView to show related data of selected item value from the user con...

Basic: How is the session id created?

Does IIS create the session id when a request is received and where is that saved (client or server)? How does server recognize that the request is coming from the same user/session? ...

How to Deserialize XML document

Hi, How do I Deserialize this XML document: <?xml version="1.0" encoding="utf-8"?> <Cars> <Car> <StockNumber>1020</StockNumber> <Make>Nissan</Make> <Model>Sentra</Model> </Car> <Car> <StockNumber>1010</StockNumber> <Make>Toyota</Make> <Model>Corolla</Model> </Car> <Car> <StockNumber>1111</StockNumbe...

ASP.net IHttpHandler to execute .aspx file

What is the proper to make an IHttpHandler to have an existing .aspx page process the request? I would like to be able to compile the .aspx file into an IHttpHandler and then have it process the request. There is the PageParser.GetCompiledPageInstance method, however in the documentation it states its not for direct use from code. I know...

How to create a Generic StateManagedCollection?

One example is described here. But the author apparently forgot to include the code for download. Another example is shown here. However, this one doesn't quite work (as described in comments). How do you do this correctly? ...

ASP.NET TreeView auto expand?

Does anyone know how to show a asp:TreeView always expanded to the leaves? So if I have a 2-level tree, I want it to be expanded at all times. Is there a property on TreeView that does this or could you show the code snippet on how to do this? Thank you very much! Ray. ...

Does system.net.mail.smptclient disconnect from the server?

We've got a few pages in our web systems that use the .net system.net.mail control to send emails. The thing has been working great, except it's now starting to look like the smptclient class may not actually be disconnecting from the server, such that the SMTP server leaves that connection open, and we ended up maxing out the number of...

How do you submit a dropdownlist in asp.net mvc

<% using (Html.BeginForm() { %> <%=Html.DropDownList("TopItemsList", ViewData["ListData"], new { onchange="[???]" })%> <% } %> In the above example, what value should you set onchange to? Or, how do you get the correct form? Is there any difference with Ajax.BeginFrom? ...

How do I use frame on ASP.NET page?

How do you correct use frame on a asp.net page, so I have a left frame and a right frame, when I click the links on the page presented in the left frame, it loads the according page in the right frame? On top of this, I need to have a master page on all the right frame's pages. How do I do this? or is there another way to achieve the ...

Authenticating ASP.NET users against Active Directory: who manages users and groups?

A project I'm working on supposed to authenticate users agains AD. I've never worked with AD before, neither did I work in organizations that use AD, so here's my stupid question: in case if AD involved, who manages roles, groups and users for application? Is it my responsibility to provide an UI for site admin to assign AD users to my a...

How do I use an ASP.net asp:RangeValidator to validate a date properly?

Here's my code: <asp:TemplateField HeaderText="* License Setup Date"> <EditItemTemplate> <asp:RequiredFieldValidator ID="LicenseSetupDateRequired" ErrorMessage="License Setup Date can't be blank." ValidationGroup="EditClientDetails" ControlToValidate="BeginDate" Text="*!" ...

Batch Printing PDFs from ASP.NET

I have a situation where in a web application a user may need a variable list of PDFs to be printed. That is, given a large list of PDFs, the user may choose an arbitrary subset of that list to print. These PDFs are stored on the file system. I need a method to allow users to print these batches of PDFs relatively easily (thus, asking th...

SO's rich text editor -- is it available somewhere?

I am looking for a good, solid, rich text editor for my ASP.NET web app (3.5). I know there are some out there and I've been looking around for a while with no luck. Does anyone know if the one SO uses (the one I'm typing in right now) is available somewhere? Your help/guidance is appreciated! ...

free auction software for ASP.NET site integration

Looking for advice on free auction software for ASP.NET website. Also, any insight on this subject is very welcome. ...

How do you change a connection string dynamically in an object datasource in asp.net?

how to change connection string dynamically in object datasource in asp.net ? ...

Assign connection string to table adapter from session

My application is already developed and now we are going to change the connection string whatever stored in the session object (Bcoz of Distributed Database Management System (DDBMS)) Problem is here..... In that application There are so many **ObjectDataSource** which are initialize with the using .XSD file. which is related ...

Problem with caching

I have an a aspx page, but all content is generated by hands(yes I know that I need to make a handler, I have another question) I want to cache output in client browser. Problem is that it's cached only for one query. public static void ProceedCaching(string etag, string lastModify, string response, HttpResponse Response, ...