asp.net

VS2008 Web Deployment Project Section Replacement with Elmah

I'm using a web deployment project and want to do some section replacement with the emlah/errorMail section. I don't want to send emails in debug build mode. I have created the custom section and put it in an errorMail.config. In the properties of web deploy project under replacements, I have elmah/errorMail=errorMail.config. The error...

Managing Software Updates

I am looking into different ways to handle updating an ASP.NET application across many different clients, and looking for suggestions from your previous experience. We need the client apps to check if they have any available updates. A way to Auto update (If possible, something similar to chromes but for webapp). Some way to check tha...

Multiple ASP.NET pages on one page

Hi, I would like to have multiple pages display on one page using asp.net. The intention is that those pages show their updates (I have a timer control that updates the pages), but I as a user should not be able to interact with them. When I click on one of those pages, it will then take me to that page and I as a user will then be able ...

Is it possible to initialize a Control's List<T> property in markup?

Let's say we have the following: public enum RenderBehaviors { A, B, C, } public class MyControl : Control { public List<RenderBehaviors> Behaviors { get; set; } protected override void Render(HtmlTextWriter writer) { // output different markup based on behaviors that are set } } Is it possible to...

Does Javascript in the html body execute when encountered?

I have inherited an ASP.net codebase and I have very limited ASP.net skills. I am struggling to understand why something works and also why it only works in IE. The following code appears in a page :- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="map.aspx.cs" Inherits="Romtrac.auth_map" Culture="auto" UICulture="auto" %> <!DO...

Where should I place additional classes in my MVC application

I have an ASP.NET MVC application which is using Linq to SQL classes placed in the Model folder. I want to create some extra classes that I would normally place in my BLL but I'm not sure how to work this with MVC. With WebForms I would have my DAL as a Class Library. My BLL as a class library that referenced my BLL. My Web Site that ...

Make PDF display inline instead of separate Acrobat Reader window

I've got an ASP.NET ashx class that retrieves data from a database, creates a PDF file using iTextSharp, and streams the PDF to the browser. The browser (IE and Firefox at least) is launching Acrobat Reader as a separate window to open the file. I'd like for it to display inline within the browser. Is that something I can completely con...

Http modules integrated into IIS 7 processing pipeline

Hello, Q1 -IIS7 by default automatically registers FormsAuthenticationModule ( which is defined in root web.config file ), but does the term “Http module being integrated into IIS 7 processing pipeline refers” only to cases where this registered module is also configured to work with non-Asp.Net applications? In my opinion if modul...

How does IIS7 decide when to invoke…?

Hello, Q1) Assuming Http module is registered with IIS7 to be used for non-Asp.Net application ( say some Java app ) , when in the request’s life cycle will IIS7 invoke this module? Thus, how will IIS7 decide when to invoke it? Q2) In order to register Http module with IIS7, we need to put it in GAC. Is it possible to register H...

HTML in ASP:Literal headache: it tries to help too much.

Edit: Updated for more clarity. I have a an unordered list of items, that I need to localize. Rather than wrapping the text of each list item - which, over the course of hundreds of <li>s, would probably kill me - I decided to wrap the <ul> in a literal. This way, I could throw the "text" attribute in a resource file for localization. ...

C# Custom EventArgs Question

Hi all, I have a custom collection that I am adding a ValidateItem event to. This ValidateItem event will be called whenever an item is added to or updated in the custom collection. I want to allow derived classes to be able to subscribe to the event and determine their own logic for whether or not an item is "valid" and potentially pr...

Can asking a developer whether he prefers WebForms or MVC be a good indicator of his proficiency?

I've just had an interesting thought. It has been a while already since some of us have enjoyed the new MVC framework for ASP.NET. We have talked about it, compared them, liked or disliked one or the other at a different point of time, argued about them each protecting his own point of view. Now it is somewhat silent. He who wanted to g...

Linq to SQL: How to update data using stored procedure

I am using linq to sql. I want to update my changed in object question using linq to sql using stored procedure any body have idea? ...

ASP.NET - clients without JavaScript

I have some functionality on my page that JavaScript is currently handling. I want to make my page compatible with non-Javascript users. Is there a way I can say "If JavaScript is enabled, use my JavaScript routine, otherwise do a Postback and let the server-side handle it?" ...

Two dates within a year of each other

I got two dates, how do I check if both dates does not exceed over one year? Short question! :-) ...

Does FormsAuthenticationModule detect whether …?

Hello, FormsAuthenticationModule is used for tracking user and role information using encrypted cookie. But does this module also contain code that actually detects whether user requesting web page has forms authentication ticket and if not, redirects user to login page, or is it actually UrlAuthorizationModule that tells FormsAuthe...

Intranet Live maps Asp.net

Hi all, I'm creating an intranet website and i have a couple of asp.net textboxes/ddl that make up a persons code. What i need help with is displaying a map based on the address. Any examples on how to do this would be very helpfuul. I tried to get a google maps api key but you need a internet web site to get one. Thanks in advance ...

Templated databound controls - template property

I have a templated databound control with several templates. I want to extend this with some new functionality. Ideally I want to do something like this: <MyControl runat="server"> <ClassTemplate ClassName="Article"> template definition comes here </TemplateClass> <ClassTemplate ClassName="News"> template defin...

Determine OS using the Environment.OSVersion object - C#

What is the best to determine the Microsoft OS that is hosting your ASP.NET application using the System.Environment.OSVersion namespace I need an example for Windows XP, Windows Server 2003 and Windows Vista Here is what I am trying to accomplish using pseudocode switch(/* Condition for determining OS */) { case "WindowsXP": ...

ASP.NET MVC + jQuery + IIS6: Multiple Ajax requests

Hello, I'm not sure where the problem is... I have an ajax request that checks the tracking information for a package on a page with a list of packages: $(".fedex_status").each(function() { var item = this; // some code to construct tracking_url $.ajax({ type: "GET", url: tracking_url, async...