asp.net

How do I - in ASP.NET save the info from a page when a user leaves the page?

In our CMS, we have a place in which we enable users to play around with their site hierarchy - move pages around, add and remove pages, etc. We use drag & drop to implement moving pages around. Each move has to saved in th DB, and exported to many HTML files. If we do that in every move, it will slow down the users. Therefore we thou...

Best way to switch configuration between Development/UAT/Prod environments in ASP.NET?

I need to switch among 3 different environments when developing my web app - Development, UAT, and Prod. I have different database connections in my configuration files for all 3. I have seen switching these settings done manually by changing all references and then rebuilding the solution, and also done with preprocessor directives. Is ...

How secure is basic forms authentication in asp.net?

Imagine that you have a simple site with only 2 pages: login.aspx and secret.aspx. Your site is secured using nothing but ASP.net forms authentication and an ASP.net Login server control on login.aspx. The details are as follows: The site is configured to use the SqlMembershipProvider The site denies all anonymous users Cookies are d...

ASP.Net Medium Trust setup

I am trying to configure the IPermission node as part of medium trust. However I am unable to find the valid values list for the PathDiscovery attribute on the node <IPermission class="FileIOPermission" version="1" Read="$AppDir$" Write="$AppDir$" Append="$AppDir$" PathDiscovery="$AppDir$"/> I need to set the permission so that the ac...

Classic ASP and ASP.NET Integration

In a previous job we had a classic ASP application that no one wanted to migrate to ASP.NET. The things that it did, it did very well. However there was some new functionality that needed to be added that just seemed best suited to ASP.NET. The decision was made to allow the system to become a weird hybrid of ASP and ASP.NET. Our...

ASP.NET/IIS: 404 for all file types

I set up 404 handler page in web.config, but it works ONLY when extension of URL is .aspx (or other which is handled by ASP.NET). I know I can setup static HTML page in website options, but I want to have a page. Is there any options to assign ASPX handler page for all request extensions in IIS? ...

Eval scripts in server side control property

how do i implement an eval script in a sever side control? eg. <a runat="server" href="?id=<%= Eval("Id") %>">hello world</a> ...

ASP.Net Session

I am wanting to store the "state" of some actions the user is performing in a series of different ASP.Net webforms. What are my choices for persisting state, and what are the pros/cons of each solution? I have been using Session objects, and using some helper methods to strongly type the objects: public static Account GetCurrentAc...

Do I have to use Viewstate in ASP.NET

I am moving from classic ASP to ASP.NET and have encountered what many of you already know as "viewstate". I might be jumping the gun with my assumption, but it looks highly cumbersome. I have developed many ASP forms in the past and never had issues with keeping state. Is there another way OR am I going to have to learn this Viewstat...

Configure db used for ASP.Net Authentication

I want to use forms authentication in my asp.net mvc site. Can I use an already existing sql db (on a remote server) for it? How do I configure the site to use this db for authentication? Which tables do I need/are used for authentication? ...

Autogeneration of a DataContext designer file when using SqlMetal and Visual Studio

I am using SqlMetal to general my DataContext.dbml class for my ASP.net application using LinqToSql. When I initially created the DataContext.dbml file, Visual Studio used this to create a related DataContext.designer.cs file. This designer file contains the DataContext class in C# that is used throughout the app (and is derived from the...

Good examples of UK postcode lookup flow

I'm looking for a good, well designed flow of a UK postcode lookup process as part of registration for an eCommerce account. We're redesigning ours and want to see what is out there and how I can make it as friendly as possible. --Update-- Basically our current design was a manual entry form (worked pretty well) which a less than expe...

setting Radio Button enabled/disabled via CSS

Is there a way to make a Radio Button enabled/disabled (not checked/unchecked) via CSS? I've need to toggle some radio buttons on the client so that the values can be read on the server, but setting the 'enabled' property to 'false' then changing this on the client via javascript seems to prevent me from posting back any changes to the...

How to resize the Asp.Net Page based on the screen resolution

Hello I am developing a web application which has Chart Controls. I have developed a common chart User Control to use across the application. I am looking for an elegent way to set the Chart control's along with other control's width, height based on the screen(browser size). Please help me Thanks Shaik ...

How to access button positions from codebehind?

Hi, I have one third party Popup to display message. It has two properties OffsetX and OffsetY. To set its position in browser. Now i am invoking this Popup on Button Click event. I need this popup just next to my Button and for that i have to set above mentioned OffsetX and OffsetY properties of Popup. I tried following code on Butto...

Migrating web application to asp.net mvc

Hi, I need your advice regarding migration. I want to migrate existing project to ASP.NET MVC and I can figure out the proccess except of url rewriting issue: for example how can I make following route: http://www.eireads.com/ireland/mayo/cars-3/1263-used-cars-citroen-c5-for-sale.aspx Or maybe I could somehow keep supporting legacy ...

Mobile Capability for meta tags render en ASP.NET Mobile

Hi, Anybody knows what is mobile capability for render Meta Tags for each adapter? I am using Marg.Wurfl to detect mobile device, and it maps wurfl capabilities to mobile capabilities, but it does not render meta tags.I have found requiresXhtmlCssSuppression capability in ASP.NET Mobile Controls XHTML Adapter Source, but it doesn´t work...

Best GAC Tutorial/Overview?

Can someone recommend a good soup-to-nuts tutorial that covers the GAC/Global Assembly Cache.? ...

ASPNET TreeView Expanded Node Style

Does anyone know how in ASP.Net's TreeView control, to have a custom style applied to an Expanded node? I have many root nodes and want the Expanded nodes to have a different background. ...

How to make Html rendering fast.

I am working on a web application developed on c#/asp.net. We are using third party controls for displaying Grids, Tabs, Trees and other complex controls in our pages. The problem is that these controls render a huge amount of Html. Due to this size of pages have grown heavily and browser takes a while to load a page. I want to find out ...