asp.net

What is the type of <location> section in Web.config?

I was expecting to find that section within "System.Web.Configuration" namespace just like other Web.config sections Under what namespace does "location" reside and what is the type of the section? ...

How can I retrieve an assembly's qualified type name?

How can I generate a assembly qualified type name? For an example, when configuring a membership provider, I would have to provide a assembly qualified type name for "SqlMembershipProvider" (in this example, i have copied the below configuration from somewhere) in "type" attribute. How do you generate that assembly qualified type name?...

Diagnosing "Request timed out" HttpExceptions

Here on StackOverflow, we're seeing a few "Request timed out" exceptions every day. The facts: Request timeout is the default 90 seconds Occurs only on POSTs Data posted is text, usually small (< 1KB), but can range to a few KB No Form data is captured in server variables Client UAs are diverse: IE5.5 - 7, Firefox 3.0.5, iPhone, Chrom...

Using ASP.NET usercontrols for templating without having a Website project?

Is there a way of using ASP.NET user-controls (.ascx files) to fill my own templating needs within a .NET application, without that application being a Website? It's actually a class library that will take data in, combine it with a template, then spit it out. I don't want to write my own templating system from scratch, so I'm looking ...

ASP.Net: How to add rows to a repeater using DOM/Javascript?

Hi Guys, I know that the asp.net repeater doesnt have a Client side object model, and we are stuck with improving the performance of many pages which have repeater/gridview with the functionality of adding rows to them by server-side code. We have used updatepanels to ajaxify the functionality adding the rows to the repeater/gridview, ...

how to set postbackurl on linkbutton control from clientside ?

I have a server control ( linkbutton ) on the aspx page. For some complicated reason - I need to set the postbackurl from client side for this button. Is there a way to set the postback url from client side ? I got some reference to javascript:WebForm_DoPostBackWithOptions method- but not sure how best to use it. ...

Creating nested master pages in ASP.NET Web Application

Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects? I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose another master page which if was available would have allowed me to create neste...

Stopping IE from highlighting the first submit-button in a form

The expected behaviour on enter in a form seems to be undefined in the HTML 4.01 Specification while the HTML 5 specification says it should be the first submit button in the form. Internet Explorer (IE) highlights the first button in the form when the form has focus by adding a proprietary border or something. Other browsers do not ad...

load aspx in div or adjust the size of a iframe

Hello, I have a htm file with an iframe and a menu structure. The menu can load a htm file in the iframe or a aspx file. No problem at all. But... Now they want the iframe to get the size of its content. (so there will be no scrollbar in de iframe, but you have to scroll the whole htm file) I didn't get this to work so I thought I wou...

How can I set the AsynchMode of an ASP.NET page programatically?

I have a page base class that has no .aspx file and so I therefore cannot set the page directive Asynch="true" - but I want pages that inherit from this base class to operate asynchronously - is there any way to set AsynchMode programatically in my base class? ...

How do you handle multiple submit buttons in ASP.NET MVC Framework?

Is there some easy way to handle multiple submit buttons from the same form? Example: <% Html.BeginForm("MyAction", "MyController", FormMethod.Post); %> <input type="submit" value="Send" /> <input type="submit" value="Cancel" /> <% Html.EndForm(); %> Any idea how to do this in ASP.NET Framework Beta? All examples I've googled for have...

ASP.NET & JSON: Function to convert GridView and Repeater in a JSON string.

Hi Guys, I need a JavaScript function which will take the Asp.net Repeater as input. The function must then parse through the object and return the data in the the rows of the object as JSON. I can them send the JSON back to the server to be interpreted/parsed and saved to the db. ...

Blank Password Conundrum

I've hit a blank here and would appreciate a kick start. I have two password textboxes on a page, and on load I default their value properties to a string of '*', since I don't want to display the proper password, or even hint at its length. Now I don't want to confuse users by letting them edit these blank strings, so on focus I clear...

From XML to object

I would like to define an asp.net page from xml, then parse/render it by calling a command name. Just like they do in Flex. Does someone has an idea how to do that? Like for example, from XML: <button onClick="DoJavascript()" text="Submit"/> <gridview ......./> To parse: <asp:button runat="server" onClick="DoJavascript()" text="Subm...

Dependency Injecting an HTTPModule

Google/MyBrain are failing me. Without using a framework (which I'll never get past my colleagues), how do you inject a dependency into an HTTPModule given that you (the programmer) are not in control of creating the instance? Are we into hacking up custom web.config sections + reflection or is there something cleaner I'm not seeing? e...

caching common lookup data - strategies

Looking at implementing caching for some common lookup data in an asp.net web application. In the past, I've created a singleton that creates a bunch of hashtables, which have public accessors. This works pretty well for read-only data that never changes. I've done a bit of looking into the System.Web.Caching, but it doesn't seem to o...

Detecting authentication timeout in handler and redirecting entire page to login page

I am writing an application where by someone can edit paragraphs on a web page. jQuery is used to send and receive the edited paragraph data to a handler, which saves it or reads it from a database. The problem is that if the forms authentication has timed out, I get the login page back from my handler. Is there any way I can detect a...

Tool to Audit Code Moves to production Web Servers?

My team recently received the results of an External Audit and we must correct one item. They want us to change the way we move code to our production environment. We currently use source control and a ticketing system for all code changes and move requests etc.. The problem comes in with how the code is pushed to our production webser...

SQL Server and asp.net application security models / best practice

For my asp.net web applications against sql server(at least the ones that require a logon to access) I generally implement security as follows: I generally roll my own user signup, user login pages and keep a userid and an encrypted password in an sql server and validate the login against that table - I also provide for forgotten passwo...

Session Variable problems when storing an object in my Session

I have a log in page where I valid my users and based on this validation I store their user info in a session variable so I can access it at any time. To do this I am trying to store an instance of one of my dbml generated classes "UserInfo". So I populate the class and then store it in a session variable I call "user" UserInfo u = n...