asp.net-2.0

SmtpClient.SendAsync bug in ASP.NET 2.0

Hello, I may be wrong, but if you are working with SmtpClient.SendAsync in ASP.NET 2.0 and it throws an exception, the thread processing the request waits indefinitely for the operation to complete. To reproduce this problem, simply use an invalid SMTP address for the host that could not be resolved when sending an email. Note that ...

What is the best way to print screens from an ASP.NET page .NET1.1/.NET2.0

I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this. ...

Finding First Row in a RDLC Table

I have a table in a RDLC report which is utilized as a subreport, and the first column of this table is a static string. Does anyone know how I can determine if a row is the first in the table. I tried using "=First("My String")" but it didn't work. ...

ReSharper giving C# 3.0 Code Inspection Warnings to .NET 2.0 Projects

When I am working in .NET 2.0 projects with the newest version of ReSharper (4.1) I am getting warnings about using the var keyword and lambadas etc.. Any idea how I can disable this only for .NET 2.0 projects? ...

Creating a multi-dimensional hashtable with generics in VB ASP.NET?

I need to create a multi-dimensional (nested) hashtable/dictionary so that I can use syntax like val = myHash("Key").("key") I know I need to use Generics but I can't figure out the correct syntax using VB in ASP.NET 2.0, there are plenty of c# examples on the net but they aren't helping much. Cheers! ...

What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ?

What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ? ...

What is the best tool to inspect the state and size of a user's session state in a ASP.Net 2.0 application.

We'd like to inspect the state of a user's session state and predefined points during the flow of a legacy web application. We'd like to see which objects are currently present and what the total size is. ...

Where do you store your misc project settings?

Some projects have properties have miscellaneous settings such as: "AllowPayments", "ShowSideBar", "SectionTitle". Really things that don't necessarily fit in to other objects. How do you guys store these kinds of values? ApplicationSettings? Flat File? Database table? How do you access them? Static object with properties? DB call? W...

Integrating jQuery into an existing ASP.NET Web Application?

Microsoft recently announced that the Javascript/HTML DOM library jQuery will be integrated into the ASP.NET MVC framework and into ASP.NET / Visual Studio. What is the best practice or strategy adopting jQuery using ASP.NET 2.0? I'd like to prepare a large, existing ASP.NET Web Application (not MVC) for jQuery. How would I deal with ve...

I want to prevent ASP.NET GridView from reacting to the enter button

I have an ASP.NET page with a gridview control on it with a CommandButton column with delete and select commands active. Pressing the enter key causes the first command button in the gridview to fire, which deletes a row. I don't want this to happen. Can I change the gridview control in a way that it does not react anymore to pressing t...

Dropdown controls in ASP.NET 2.0

I am using a codebehind page in ASP.NET to perform a SQL query. The query is loaded into a string, the connection is established (To Oracle), and we get it started by having the connection perform .ExecuteReader into a OleDBDataReader (We'll call it DataRead). I'll try to hammer out an example below. (Consider Drop as an ASP DropDownL...

Installing .NET 3.5 on a server with .NET 2.0 applications

I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it will break the applications on that machine that are running 2...

Changing the application pool through a Web Deployment Project

Is there a way to configure a Visual Studio 2005 Web Deployment Project to install an application into a named Application Pool rather than the default app pool for a given web site? ...

Repeated cookie query or Storing in viewstate? Which is the better practice?

I have a internal website that users log into. This data is saved as a cookie. From there the users go on their merry way. Every so often the application(s) will query the authentication record to determine what permissions the user has. My question is this: Is it more efficent to just query the cookie for the user data when it is n...

Call Javascript function and return value from ASP .NET

Lets say on my page I have this function: function ReturnFoo(bar) { return bar.toString() + "foo"; } Now, I would like to have this called from ASP .NET, hopefully with the ASP .NET AJAX framework, as I am already using it in this codebase (I have already spent the 100k, might as well use it). Also, I would like to get back the...

What is the simplest way to charge money over the Internet?

I have a .Net 2.0/3.5 WebApplication. I want to be able to take money over the internet for my service. Each of my customers will have an AccountNo. I wish to offer several products each of which will have fixed price. I need for my customer to login to my system and elect to pay me money for a product of their choice and for my app ...

How do you cast from Page.Master to a specific master page in ASP.NET

I have a BasePage which inherits from System.Web.UI.Page and every page that inherits the BasePage will have the same master page. How do I cast the Page.Master of the BasePage to the specific master page so I can access properties on it? ...

Passing a outside variable into a <asp:sqldatasource> tag. ASP.NET 2.0

I'm designing some VB based ASP.NET 2.0, and I am trying to make more use of the various ASP tags that visual studio provides, rather than hand writing everything in the code-behind. I want to pass in an outside variable from the Session to identify who the user is for the query. <asp:sqldatasource id="DataStores" runat="server" connec...

What is the most efficient way to handle en expired session with ASP.NET 2.0

On the site we are building. We need to be able to redirect the user to a default page when his session has ended. At first sight we used the Session_End with a Response.Redirect to do this job. Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) Response.Redirect("~/global/exit.aspx") End Sub But it generates a craploa...

Unsecure posting back from an asp.net control on a secure page while avoiding authentication

We are using standard asp.net forms authentication. Certain pages require a user to be logged in; and least some of these pages are delivered by https. There is a search control at the top of each page. When this is used, we don't care whether the user's session has expired, even if the current page requires a log in. However, curr...