asp.net

What is the best way to lock cache in asp.net?

I know in certain circumstances, such as long running processes, it is important to lock ASP.NET cache in order to avoid subsequent requests by another user for that resource from executing the long process again instead of hitting the cache. What is the best way in c# to implement cache locking in ASP.NET? ...

Remote Debugging Server Side of a Web Application with Visual Studio 2008

So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attac...

How do I install and use the ASP.NET AJAX Control Toolkit in my .NET 3.5 web applications?

How do I get it to work with my project? http://ajax.asp.net/ http://www.codeplex.com/AjaxControlToolkit/ ...

How do I get the full url of the page I am on in C#

I need to be able to get at the full URL of the page I am on from a user control. Is it just a matter of concatenating a bunch of Request variables together? If so which ones? Or is there a more simpiler way? ...

Where do you store your database connectionstring?

I usually store my connectionstring in web.config or in the application settings of my Visual Studio project. The application I'm currently working on makes a lot of trips to the database which means it will look up the connectionstring every time. Should I be putting the connectionstring in the cache or should I be looking at storing th...

File Access Strategy in a Multi-Threaded Environment (Web App)

I have a file which is an XML representation of some data that is taken from a Web service and cached locally within a Web Application. The idea being is that this data is very static, but just might change. So I have set it up to cache to a file, and stuck a monitor against it to check if it has been deleted. Once deleted, the file will...

Setting viewstate on postback

I am trying to set a ViewState-variable when a button is pressed, but it only works the second time i click the button. Here is the codebehind: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { lblInfo.InnerText = String.Format("Hello {0} at {1}!", YourName, DateTime.Now.ToLongTimeString()); } } private...

Conditional Display in ASPX Pages on Sharepoint

Hello, I wonder what the best practice for this scenario is: I have a Sharepoint Site (MOSS2007) with an ASPX Page on it. However, I cannot use any inline source and stuff like Event handlers do not work, because Sharepoint does not allow Server Side Script on ASPX Pages per default. Two solutions: Change the PageParserPath in web.co...

Using Custom MembershipProvider without a Login control in ASP.NET

We have got a custom MembershipProvider in asp.net. Now there are 2 possible scenario the user can be validated: User login via login.aspx page by entering his username/password. I have used Login control and linked it with the MyMembershipProvider. This is working perfectly fine. A authentication token is passed via URL in query strin...

jquery tablesorter plugin

Im using the tablesorter plugin ( http://tablesorter.com ) and am having a problem with column widths in IE7, it looks fine in firefox and sometimes in IE7. here's a screenshot of the problem: IE7 View and here's how it's supposed to look: Firefox view ...

Traditional ASP .NET Web Forms vs MVC

As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC? I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and things on the ASP ...

Excluding a folder from source control in an ASP.NET website?

Right now I am working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I am wondering if there is a way to just exclude that partic...

How do I prevent the closing of modal popup window(ModalPopupExtender) on postback?

I'm using Microsoft AjaxControlToolkit for modal popup window. And on a modal popup window, when a postback occured, the window was closing. How do i prevent from the closing action of the modal popup? ...

Customizing Visual Studio

I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful? Update: Thanks for all the great suggestions. It look...

[ASP.NET ERROR] The request was aborted: Could not create SSL/TLS secure channel.

I'm posting this on behalf of a co-worker. He gets a "The request was aborted: Could not create SSL/TLS secure channel" error while using a WebRequest object to make an HTTPS request. Th funny thing is that this only happens after a while, and is temporarily fixed when the application is restarted, which suggests that something is being...

ASP.Net: why is my button's click/command events not binding/firing in a repeater?

Here's the code from the ascx that has the repeater: <asp:Repeater ID="ListOfEmails" runat="server" > <HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate> <ItemTemplate> [Some other stuff is here] <asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" /> </ItemTemplate> </asp:Repeater> And in th...

asp:UpdateProgress - surpressing the line-break

I've started working with ASP.net AJAX (finally ☺). and I've got an update panel together with a asp:UpdateProgress. My Problem: The UpdateProgress always forces a line-break, because it renders out as a div-tag. Is there any way to force it being a span instead? I want to display it on the same line as some other controls without havin...

Can't get my event to fire

When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event. However, when clicking the button, after the page reloads, my event handler does not fire. Can anyone explain why? ...

What View Engine are you using with ASP.NET MVC?

I know you can use several different view engines with ASP.NET MVC: ASPX, obviously NVelocity Brail NHaml et al... The default ASPX view engine seems to make the most sense to me, coming from an ASP.NET WebForms background. But, I wanted to get an idea of the pros and cons of each and see what most people are using. Which does S...

"Out of Band" Processing Techiniques for asp.net applications

Jeff has previously blogged about using the cache to perform "out of band" processing on his websites, however I was wondering what other techniques people are using to process these sorts of tasks? ...