asp.net

Cross domain cookie access (or session).

While I realise that this is usually related to cross site scripting attacks, what I'm wondering is how can a session remain valid throughout multiple subdomains belonging to a single domain (example: a user logging in only once, and being able to access both subdomain1.domain.com and subdomain2.domain.com with the same session). I guess...

Button on click method entered on page refresh!

Hi, I have a .net 2.0 application and I can't work out why a button's onclick method is run on page refresh. The exact scenario when this happens is a checkbox is ticked against each item the button is clicked and the onclick mthod processes this item, and the checkbox is cleared. Now when the page is refreshed for some reason the oncl...

How to stop Pages becomming too bloated in webforms

I have an ASP.net webforms app that connects to a web service, All the functionality is on one page that has lots of difference states and I use a multi view to display the correct html depending on the current state. The problem is the page is huge and unweildly. The code behind isn't so bad but the aspx page is just out of control. I...

Justification for MVC?

Hi guys, I was wondering if someone could provide me with some answers. I've been asking to swap our internal apps to an MVC architecture for quite a while now. Rails was absolutely shot-down as a toy, Struts is just too huge for the apps we do, Django's name makes these old folks nervous (oil & gas industry) but finally, finally Micr...

Unit testing the MS AJAX Toolkit HTML editor

Is it possible to unit test the MS AJAX Control Toolkit's HTML Editor? I've tried Watin, WebAii and Selenium without any success... Watin I can find the textbox related to the control but I get an exception trying to access it: using (Browser ie = new IE()) { ie.GoTo(testUri); Assert.IsTrue(ie.ContainsText("Expected text")); ...

How to simulate form's submission with jQuery?

I've a form on my ASP.NET web page. There is submit button also. I've some validation logic attached to client-side click event of a button. I'd like to submit this form from my jQuery validation logic, how to achieve this? ...

ASP.NET Profile Templates

Is it possible have more than one profile template? I'm working on an internal application for a company that will be distributed to multiple locations and have different setups. I was thinking of having a profile for user preferences, and then using the profile system to store system configuration information (I didn't want to load th...

What will change if i learn Ruby? (I know ASP.NET)

I wonder that, Ruby programming language is ...(easy/difficult) to learn. I can develop web application %x faster than asp.net. There are a lot of screen casts to learn Ruby.(http://xxxRubLearn.xxx, etc.) The principle(s) of Ruby is(are) only ...... You can increase work proccessor (like W3P on IIS) and make faster your web app. Futu...

What's the difference between compilation debug="false" and Release mode?

In ASP.NET, what's the difference between building a project with in the Web.config and with Release mode in the Configuration Manager? When would you use one and not the other? ...

How to configure ELMAH to work with Windows Azure? I get a 404 on Elmah.axd.

I have an ASP.NET MVC web role running on Windows Azure and have setup ELMAH properly in the web.config. I also have my global.asax ignore *.axd routes. Locally, I am able to load /elmah.axd, however when I deploy to Azure, I get a 404 on that page. Has anyone gotten ELMAH working on Azure? ...

Date validation with ASP.NET validator

I'm trying to use an ASP.NET RangeValidator to validate a date on a textbox. The format of the date entered on the textbox is dd MMMM yyyy. How can I use the range validator to validate a valid date? If I enter 1 January 1000 as the min or max value I get an error saying value cannot be converted to type date, but if I use another forma...

C# Where is the Authcookie set?

When using FormsAuthentication, where is the Authcookie placed? On the server or on the client? And when the client has cookies disabled, does FormsAuthentication still work? ...

How can I determine the cause of an IIS Crash on a 64-bit Server

I have a .net 2.0 web application that is running on Windows server 2003 Standard x64, using IIS 6. The application pool for our website started crashing recently and I can't determine why. It started happening on a weekend, and the latest release of the website was several days earlier. I have determined that no other changes were made...

Using Forms Authentication/Authorization with Rewritten URLs

I'm doing a quick sandbox test with some Rewritten URLs (example taken from Scott Guthrie's blog) and Forms Authentication / Authorization. I've a very simple setup. ~/View/(\d{1,6}) => ~/Public/View.aspx?ContentID=$1 AND ~/Buy/(\d{1,6}) => ~/Private/Purchase.aspx?ContentID=$1 I've confirmed the URL Rewriting...

ASP.Net website installer references

Are all the dll's in my Website - Property Pages - References tab copied into an .msi istaller by default for a Website project type? The references don't seem to have any options as they would in a web app or desktop app project type (such as Copy Local, etc). My installer includes the Content Files from my website project, and any cl...

Html input control for passwords - not showing no of characters typed or showing spaces instead of dots

Is is possible to use the password element in html input type="password" in a mode whereby one dosn't show the characters types as asterixes/circles but as spaces/nothing so noone would know the length of the password. ...

Post jQuery dialog values to server in ASP.NET

Hi, I'm new to jQuery. I've got a dialog with several input boxes in it. I want the user to be able to hit a button and have the values posted back to the server - idealy to be picked up in a server event. What are the ways to achieve this? Many thanks. ...

Show Header/Footer when Gridview is Blank VB.net

I realise there is a solution for this but I am struggling to get it to convert to VB correctly :( I have managed to get a cascading set of dropdowns with data based upon each others results which I was really pleased with. However due to the post back the grid will disappear until the second value is selected and looks awful Is there...

HttpSimulator and Null Reference from ResolveAdapter()

I'm trying to unit test a few controls using the HttpSimulator object from subtext (more here). However, some controls throw a NullReferenceException from the method System.Web.UI.Control.ResolveAdapter(). Has anyone dealt with this problem? Is there a different tool that allows simulating the session and request structure but doesn't h...

Session Variable Member?

I'm using a compiled .dll provided by someone else -- I know little about it, other than it has a session variable that I must access in a way that is strange to me. Not sure what to call it -- have googled for words that I thought might be right, but so far no success. Here is what it looks like: Session("receipt").username It's the...