asp.net

Does .Net do clever connection management like PHP?

During an ASP.NET page load I'm opening and closing multiple System.Data.SqlClient.SqlConnections inside multiple controls contained in the page. I thought it would be a good idea instead to create a "pool" of connections and when opening a connection check to see if the connection string matches that of an open connection in the pool, a...

When developing a website with visual studio, how do I improve the build time?

I have a lot of classes in the App_Code directory could this be a problem? Would it build faster if it was in a separate library? Any other tips? ...

ASPNET 2.0 Membership database

Hi, I have an application database and an aspnetdb database (generated from the ASP.Net 2.0 framework). I have restored both database from production onto my development environment but I am unable to log on with any of the users credentials that work on production. So my question is is there anything that ties the aspnetdb database ge...

Multidimensional Repeating Data Control

Excuse my title if it's confusing, but I don't know how else to describe this, except in the long explanation below: I would like to create a multidimensional, templated, data bound, repeating ASP.NET control, with paging and sorting. I.e. You specify how many columns and rows per page, so items are displayed across and down, e.g. [da...

How can I make email go to a local folder during testing?

How can I test sending email from my application without flooding my inbox? Is there a way to tell IIS/ASP.NET how to deliver email to a local folder for inspection? ...

Downloading document from internal server externally

This a bit of strange one.... We have an internal web app that runs on server (A) and a document repository that runs on server (B). I have simple link on a page and I want to enable the user to download a document(From IIS Server (A)). However this document does not exist on Server (A) until the user clicks the button(because there is...

Simulating <%#Bind(...) %>

ASP.Net: In code-behind I can simulate <%# Eval("Property")%> with a call to DataBinder.Eval(myObject,"Property"); How do I simulate a call to <%# Bind("Property")%> ? many thanks ...

User configurable security in multi-tenant ASP.NET website

We are building a multi-tenant website in ASP.NET, and we must let each customer configure their own security model. They must be able to define their own roles, and put users in those roles. What is the best way to do this? There are tons of simple examples of page_load events that have code like: if (!user.InGroup("Admin") ...

IIS Service Unavailable

When I attempt to update the code on a IIS webserver by replacing the old code with my new code, I receive 503 Service Unavailable replys when attempting to access any of the replaced pages on the server. What is the cause of this failure and what steps can I take to correct such errors? Thanks. ...

What happens when I edit web.config?

I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors). Will this cause the IIS6 worker process to recycle? Will active users lose their session state because of this? Or can I safely edit the file? ...

When does a DropDownList retain the value from postback at the SelectedIndexChanged Event Handler

To Clarify to all this problem absolutely does not stem from rebinding of the controls and the value does not remain the initial value after binding. I have a DropDownList on an aspx page which is being used in multiple projects. Along the life cycle of the page the SelectedValue is changed prior to the handling of the SelectedIndexCha...

Form Elements in ASP.NET Master Pages and Content Pages

OK, another road bump in my current project. I have never had form elements in both my master and content pages, I tend to have all the forms in the content where relevant. In the current project however, we have a page where they want both. A login form at the top right, and a questions form in the content. Having tried to get this i...

Properly file Designer Files in ASP.NET Web Sites

I need to get existing web pages into an existing ASP.NET web site in Visual Studio 2008. I simply tried to drag and drop the whole file folder content into the Visual Studio Solution Explorer or even to copy them into the web site folder. Both ways, Visual Studio seems unable to map the .designer.cs files to the corresponding .aspx (or...

LINQ query to WebControl.Controls

I have three TextBox controls on the page <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="1"> <asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="2"> <asp:TextBox ID="TextBox3" runat="server" AutoPostBack="...

ASP.NET xsd dataset where do I put it

I am trying to convert an ASP.NET website into a web application project. The conversion has gone ok I think apart from previously I had 2 xsd files in the App_Code folder. I believe this folder is not used in web applications projects, so where would I put xsd files now. ...

Split large ASP.NET pages into pieces

Is it possible to split large ASP.NET-pages into pieces? JSP has the jsp:include directive. Is there any equivivalent in ASP.NET I'm not interested in reusing the pieces. I just want to organize the HTML/ASP code. Isn't User Controls and Master Pages overkill for doing this? ...

How do I debug a memory dump of a spiking ASP.NET process?

Sorry, I couldn't figure out a good way to phrase my real question. I run a high-traffic ASP.NET site on a 64-bit machine. I have IIS running in 32-bit mode, however, due to some legacy components of the app. I am running this particular web app inside an application pool that has the web garden option on (running 6 processes inside a...

Why doesn't this JavaScript display a confirm box?

I am trying to fix some bugs in a product I inherited, and I have this snippet of javascript that is supposed to hilight a couple of boxes and pop up a confirm box. What currently happens is I see the boxes change color and there is a 5 or so second delay, then it's as if the missing confirm just accepts itself. Does anyone smarter tha...

Change Theme / CSS based on user

I am building a product that we are eventually going to white-label. Right now I am trying to figure out the best way to facilitate these requirements programmatically so the user can update the basic design of the site (ie header color, etc) via their profile/settings form. Requirements: - User can update the logo (this is complete) ...

Filter "list" of divs with Javascript

I have a repeater that outputs divs like the following for every item returned from some method. <div class="editor-area"> <div class="title">the title</div> <div>the description</div> <div class="bottom-bar"> <a href="link">Modify</a> <a href="link2">Delete</a> </div> </div> I need to have a textbox on...