asp.net

Concurrent ASP.NET session best practices

User A logs into a ticket management system to edit content on "SomePage.aspx" User B logs in 30 seconds later to edit the same ticket on "SomePage.aspx" What are some of the best known practices(in a 3-tier architecture) for notifying each of the users that someone else is modifying the same content? ...

aspnet_regIIS.exe -i does not add aspx to scriptmaps

After installing asp.net (and aspnet_regIIS.exe -i) the site doesn't accept my default.aspx page. When trying to access it I get a 404. When hitting directly to my mvc pages (/search.mvc for example) it works like a charm. We checked the website configuration and noted that there are no .aspx references in the scriptmaps node. What am ...

Interiting from asp:Image or asp:ImageButton?

I got this logic in a control to create a correct url for an image. My control basically needs to diplay an image, but the src is actually a complex string based on different parameters pointing at an image-server. So we decided to to create a control MyImage derived from asp:Image - it works like a charm. Now i need the same logic but ...

Subclassing DropDownList in ASP.NET

Hi, I want to subclass the built-in DropDownList in ASP.NET so that I can add functionality to it and use it in my pages. I tried doing this with a UserControl but found that it doesn't expose the internal DropDownList (logically, I guess). I've googled for the answer but can't find anything. I've come as far as writing the actual clas...

Binding xml document to gridview doesn't work

Hi, I have an xml document which looks like this: OK suppressionlist_get Suppression List Get 24 Oct 08 @ 10:16AM [email protected] RECIPSELF Recipient self suppressed 23 Oct 08 @ 8:53PM facm I have omitted the closing of the document for clarity and to keep this post short. Anyway, I have a gridview and ...

How to define default "TagPrefix" for custom controls

Hi all, I have a number of custom controls that I am trying to enable designer support for. The signature looks something like the following: [ToolboxData("<{0}:MyDropDownList runat=\"server\" CustomProp="123"></{0}:MyDropDownList>")] public class MyDropDownList: DropDownList { ... code here } This works fine, but when I drag a co...

ASP.NET 2.0 Application on IIS 5 Resulting in Error (aspnet_wp.exe (PID: XXXX) stopped unexpectedly.)

After hosting an ASP.NET 2.0 web application on a windows 2000 server(IIS 5). I was unable to browse the web site. The following error message was displayed on the browser and three Event Log entries were added... Error Message on Browser Server Application Unavailable The web application you are attempting to access on this web se...

Need to Impersonate user forAccessing Network resource, Asp.Net Account

Hi, I need to access a network resource on which only a given Domain Account has access. I am using the LogonUser call, but get a "User does not have required priviliege" exception, as the web application is running with the asp.net account and it does not have adequate permissions to make this call. Is there a way to get around it? Ch...

It the use of multiple languages in ASP.NET code behind pages acceptable?

For the purposes of this question, the code base is an ASP.NET website that has multiple pages written in both C# and Visual Basic .NET. The primary language is C# and the Visual Basic .NET webpages where forked into the project as the same functionality is needed. Should the time be taken to actually rewrite these pages, including goi...

Reporting software recommendations for .net environment

I'm looking for some good recommendations for reporting software for an ASP.net, web application focused shop. Whatever it is, it needs to easily be able to export results to multiple formats (PDF, RTF, TIFF, etc.) Also, it has to be able to easily tie in with our data access layer (Nhibernate). Thanks! ...

c# Reporting Services -- ReportParameter value that isn't a string

Ok I'm working on a little project at the moment, the Report expects an int but the ReportParameter class only lets me have a value that's a string or a string[] How can I pass an int? thanks dan ...

How to: Cross-Site posting and redirection in ASP.NET webforms

Scenario: The task I have at hand is to enable a single-signon solution between different organizations/websites. I start as an authenticated user on one organization's website, convert specific information into an Xml document, encrypt the document with triple des, and send that over as a post variable to the second organizations login...

applying filters 'like' clause on data returned via subsonic

i have a data access layer which returns data from stored procedures. If i bind this to a gridview control in asp.net 2.0, the users then have an option of filtering on that data select list where in they can choose the conditional clause of like = or and Once the result is returned, I do not want to hit the Db again with the filter...

Writing gridview to file does not work with nested for loop

I have this loop, which I am using to get the values of all cells within all rows of a gridview and then write it to a csv file. My loop looks like this: string filename = @"C:\Users\gurdip.sira\Documents\Visual Studio 2008\WebSites\Supressions\APP_DATA\surpressionstest.csv"; StreamWriter sWriter = new StreamWriter(filename); string Str...

Does viewstate expire?

Let's say you have a aspx page that does not rely on session, but does rely on viewstate for persistance between postbacks. If a user is accessing this page, and leaves for a long lunch, will viewstate still be valid when he returns? ...

Is a Session ID generated on the Server-side or Client-side?

This web page http://www.w3schools.com/ASP/prop_sessionid.asp states that a session ID is generated on the ServerSide. If this is the case, then how does a server know it's still the same client on the 2nd request response cycle? Surely the SessionId would be generated on the ClientSide so that the client would be sure of passing the ...

efficient ways to anonymous personalization using ASP.NET + Cookie

Hi all: I am trying to achieve anonymous personalization in a ASP.net environment. I know that ASP.NET 2.0 provide Profile. However, I want to avoid traffic to the database as much as possible since the site I am working on is a relatively high traffic site. The other obvious solution is cookie, but given the limitation of cookie, I w...

ListView with DataPager not working

From everything I've read, it seemed that adding paging to a ListView control should be dead simple, but it's not working for me. After adding the ListView and DataPager controls to the form and wiring them together, I'm getting very odd behavior. The DataPager correctly limits the ListView's page size, but clicking the paging buttons do...

Can I setup an IIS MIME type in .NET?

Can I setup a custom MIME type through ASP.NET or some .NET code? I need to register the Silverlight XAML and XAP MIME types in IIS 6. ...

How can I disable ViewState for dynamically created controls?

I can't seem to be able to disable ViewState for controls that I add to a page dynamically. ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Page1.aspx.cs" Inherits="Page1" EnableViewState="false" %> ... <asp:PlaceHolder ID="DropDownPlaceHolder" runat="server" EnableViewState="false" /> <asp:Button ID="Submit" runat="server...