asp.net

C# / ASP.NET - Web Application locking

I'm working on a C#/ASP.NET web application, and I have a number of situations where I need to do locking. Ideally, I want the locks to act independently, since they have nothing to do with each other. I've been considering [MethodImpl(MethodImplOptions.Synchronized)] and a few ways of using lock(), but I have a few questions/concerns....

How can I hyperlink to a file that is not in my Web Application?

Ok, my web application is at C:\inetpub\wwwroot\website The files I want to link to are in S:\someFolder Can I make a link in the webapp that will direct to the file in someFolder? ...

How do I apply css to second level menu items?

I have a menu running off of a sitemap which one of the SiteMapNode looks like this: <siteMapNode title="Gear" description="" url=""> <siteMapNode title="Armor" description="" url="~/Armor.aspx" /> <siteMapNode title="Weapons" description="" url="~/Weapons.aspx" /> </siteMapNode> I also have a Skin applied to the asp:menu which ...

What is the best method to achieve dynamic URL Rewriting in ASP.Net?

I'm currently using Intelligencia.UrlRewriter does anyone have better suggestions? ...

How to interact between Web App and Windows Form Application

I have a problem where a Web Application needs to (after interaction from the user via Javascript)    1) open a Windows Forms Application    2) send a parameter to the app (e.g. an ID) Correspondingly, the Windows Forms Application should be able to    1) send parameters back to the Web Application (updating the URL is ok)    2) open th...

How would you implement database updates via email?

I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and stored in the underlying...

text box giving problems on ASP.Net page

I am designing a page to Add/Edit users - I used a repeater control and a table to display users. In users view the individual columns of the table row have labels to display a record values and when users click on edit button, the labels are hidden and text boxes are displayed for users to edit values - The problem is - as soon as the t...

ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)?

Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed. ...

How do I turn a relative URL into a full URL?

This is probably explained more easily with an example. I'm trying to find a way of turning a relative URL, e.g. "/Foo.aspx" or "~/Foo.aspx" into a full URL, e.g. http://localhost/Foo.aspx. That way when I deploy to test or stage, where the domain under which the site runs is different, I will get http://test/Foo.aspx and http://stage/Fo...

GridView Row to Object Type

In ASP.NET, if I databind a gridview with a array of objects lets say , how can I retrieve and use foo(index) when the user selects the row? i.e. dim fooArr() as foo; gv1.datasource = fooArr; gv1.databind(); On Row Select Private Sub gv1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArg...

[AjaxControlToolkit] How to bind extenders to controls on clientside

I have some dynamically created inputs which are not server-side controls. I want to relate them to some CalendarExtender and MaskedEditExtender on the clientside. Is there a way to do that? ...

Problem Exporting DataGrid to Excel

I first got an error usign the code below, explaining that "DataGridLinkButton' must be placed inside a form tag with runat=server." Now I've tried setting AllowSorting to false, as well as removing the sort expression from each column, with the same error. Then I tried creating a new, plain, DataGrid, with the same data source, but no...

[ASP.NET] Controls do not appear on dynamically created user control

I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox ID="dateTextBox" runat="server"></asp:TextBox> <asp:TextBox ID="timeTextBox" runat="server"></asp:TextBox> I am dynamically creating this control in another user control: Controls.Add(GenerateDateTime(parameter)); private DateTimeUC GenerateDateT...

Does Cache activity prevent IIS from unloading an ASP.NET app?

I want to add a scheduled task to a client's ASP.NET app. These posts cover the idea well: http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/ http://stackoverflow.com/questions/45841/what-is-the-best-practice-to-kick-off-maintenance-process-on-aspnet http://stackoverflow.com/questions/42822/out-of-band-processing-te...

How do I validate that a list box is not empty (client side)

I'm working with ASP.NET 3.5. I have a list box that users must add items to (I've written the code for this). My requirement is that at least one item must be added to the listbox or they cannot submit the form. I have several other validators on the page and they all write to a ValidationSummary control. I would like this listbox valid...

Child Control Initialization in Custom Composite in ASP.NET

Part of the series of controls I am working on obviously involves me lumping some of them together in to composites. I am rapidly starting to learn that this takes consideration (this is all new to me!) :) I basically have a StyledWindow control, which is essentially a glorified Panel with ability to do other bits (like add borders etc)...

How do I bind an ASP.net ajax AccordionPane to an XMLDatasource?

Title says it all. I've got an angry boss that will beat me down if I waste another day on this :-P Many karma points to the ajax guru who can solve my dilemma. But more detail: I want to have an AccordionPane that grabs a bunch of links from an XML source and populate itself from said source. ...

ASP.NET Ajax - Asynch request has separate session???

We are writing a search application that saves the search criteria to session state and executes the search inside of an asp.net updatepanel. Sometimes when we execute multiple searches successively the 2nd or 3rd search will sometimes return results from the first set of search criteria. Example: our first search we do a look up on ...

What is the best practice for view file/directory structure in ASP.NET MVC?

I'm confused with how views are organized. Under the views directory, there are subdirectories. Inside these subdirectories are views. I'm assuming that the subdirectories map to controllers, and the controllers act on the views contained within their subdirectories. Is there an emerging expectation of what types of views are contain...

ASP .Net server control events order

Which are the events of an ASP .Net server control and how does their order relate to the containing page's events? The concrete problem is that I am looking for an event inside the server control that fires before the *Page_Load* event of the containing page. ...