asp.net

ASP.NET Display SVN Revision Number

I see in the Stack Overflow footer that the SVN Revision number is displayed. Is this automated and if so, how does one implement it in ASP.NET? (Solutions in other languages are acceptable)...

Tracking state using ASP.NET AJAX / ICallbackEventHandler

I have a problem with maintaining state in an ASP.NET AJAX page. Short version: I need some way to update the page ViewState after an async callback has been made, to reflect any state changes the server made during the async call. This seems to be a common problem, but I will describe my scenario to help explain: I have a grid-like c...

Visual Studio 2008 debugger already attached work-around

I get the following error pretty regularly when compiling in Visual Studio and running my web application: "Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server." Normally this is after having debug the application onc...

What are effective options for embedding video in an ASP.NET web site?

A quick glance at the present-day internet would seem to indicate that Adobe Flash is the obvious choice for embedding video in a web page. Is this accurate, or are they other effective choices? Does the choice of ASP.NET as a platform influence this decision?...

Is it better to create Model classes, or just stick with generic database utility class?

We have a simple utility class in-house for our database calls (a light wrapper around ADO.Net), but I am thinking of creating classes for each database/object. Would it be smart to do so, or would it only benefit if we were using the full MVC framework for ASP.Net? So we have this: SQLWrapper.GetRecordset(connstr-alias, sql-statement...

Using ASP.NET Dynamic Data / LINQ to SQL, how do you have two table fields have a relationship to the same foreign key?

I am using ASP.NET Dynamic Data for a project and I have a table that has two seperate fields that link to the same foreign key in a different table. This relationship works fine in SQL Server. However, in the LINQ to SQL model in the ASP.NET Dynamic Data model, only the first field's relationship is reflected. If I attempt to add the...

ASP.NET absolute path back to web-relative path

If I have managed to locate and verify the existence of a file using Server.MapPath and I now want to send the user directly to that file, what is the fastest way to convert that absolute path back into a relative web path?...

ASP.NET Hosting Options

I'm not trying to start a "which language is better" argument here, so please don't go there. I typically use PHP for most of my web development (mostly because hosting is cheap), but for various reasons I'm looking to use ASP.NET for a couple new projects. But one of the major reasons I've stayed away from ASP.NET up until now is the ...

Call ASP.NET Function From Javascript?

I'm writing a web page in ASP.NET. I have some Javascript, and I have a submit button with an onClick event. Is it possible to call a method I created in ASP with Javascript's onClick event? ...

Looking for ASP.NET code to render a form that displays a view of an object

I've got the task of displaying a web form to represent the properties in a .NET class. In WinForms, there's a pre-fab control named PropertyGrid that is a lot like what I need. I'm just looking for something to display a simple layout of property names next to an appropriate control like a textbox for strings or a dropdownlist for enum ...

Dual vs. Quadcore on a Webserver

The discussion of Dual vs. Quadcore is as old as the Quadcores itself and the answer is usually "it depends on your scenario". So here the scenario is a Web Server (Windows 2003 (not sure if x32 or x64), 4 GB RAM, IIS, ASP.net 3.0). My impression is that the CPU in a Webserver does not need to be THAT fast because requests are usually r...

How do I best detect an ASP.NET expired session?

I need to detect when a session has expired in my Visuial Basic web application. This is what I'm using... Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If CurrentSession.IsNew AndAlso (Not Page.Request.Headers("Cookie") Is Nothing) AndAlso (Page.Request.Headers("Cookie").IndexOf("ASP.N...

LinqDataSource - Can you limit the amount of records returned?

I'd like to use a LinqDataSource control on a page and limit the amount of records returned. I know if I use code behind I could do something like this:IEnumerable<int> values = Enumerable.Range(0, 10);IEnumerable<int> take3 = values.Take(3); Does anyone know if something like this is possible with a LinqDataSource control? [Update] I'm ...

The Difference Between a DataGrid and a GridView in ASP.NET?

I've been doing ASP.NET development for a little while now, and I've used both the GridView and the DataGrid controls before for various things, but I never could find a really good reason to use one or the other. I'd like to know: What is the difference between these 2 ASP.NET controls? What are the advantages or disadvantages of both?...

ASP.Net 2.0 Application without Business Logic Layer?

Is it "acceptable" to have an ASP.Net 2.0 application without the BLL (Business Logic Layer) as the following? SQL Server Data Storage & Stored Procedures Data Link Layer (Strongly Typed Table Adapters) connecting to Stored Procs Presentation Layer ASPX Pages with Code behind and ObjectDataSource for connection straight to the DLL Is...

What is the best way to do unit testing for ASP.NET 2.0 web pages?

Any suggestions? Using visual studio in C#. Are there any specific tools to use or methods to approach this? ...

Upgrade to ASP.NET 3.x

I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framwork. Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framwork?...

Using ConfigurationManager to load config from an arbitrary location

I'm developing a data access component that will be used in a website that contains a mix of classic ASP and ASP.NET pages, and need a good way to manage its configuration settings. I'd like to use a custom ConfigurationSection, and for the ASP.NET pages this works great. But when the component is called via COM interop from a classic AS...

ASP.NET MVC - Is it worth it yet?

For any of you that have used ASP.NET MVC (especially the Stack Overflow team), do you think it's worth taking the plunge with a technology that's still in "Preview" releases, not even Beta yet? From what I've seen on the MVC site and various blogs, it seems that a lot is still in flux, making it so that upgrading to the latest MVC vers...

Interview Questions for an Intern

I have a potential intern coming in tomorrow for his second interview. Following Joel Spolsky's advice from "Smart & Get Things Done" this is where we get a little technical and make sure the kid can do the things he says he can do. We are a ASP.NET, C# (1.1 - 3.5) shop that uses XHTML/CSS, jQuery, SQL Server 2000/2005 primarily for ou...