asp.net-2.0

Programmatically diagnosing ASP.Net session loss due to application recycling?

We've got an ASP.Net 2.0 (VS2005) application that works fine locally, but sometimes loses session state when deployed on the remote server. I suspect a possible issue with IIS recyling the application and thereby blowing away the users' session state. However, the server is remote not under our control... so we can't simply fire up ...

Problems in development when using absolute path in links (due to friendly urls)

I using urlrewriter.net to implement friendly urls. When I did the rewriting I used subfolders on occasions. I found myself having problems with images and links and the ~ sign wasn't working for me. After reading a bit I found out that I'm not the only one with that problem and they recommended using full path "www.website.com/images/x...

Problems with relative links while using friendly url

I'm using urlrewiter.net in order to implement friendly url's. It's a great and easy to use package! Nevertheless, while using subfolders I had problems with the relative links to images and to other inner pages. I tried to use ~ (server side) and it didn't do the trick. Is there another solution? ...

ASP.NET: GridView value set to null when column is not visible

I'm using a list of objects as the data source of my GridView and when I set columns to not be visible the updates fail because the value of those columns is changed to null (and the column doesn't allow nulls). The values do exist when the columns are visible but I really don't want to display these columns because, for the most part,...

Postback destroys user controls in my GridView columns

I have a ASP.NET GridView that uses template columns and user controls to allow me to dynamically construct the datagrid. Now I'm implementing the event handler for inserting a row. To do that, I create an array of default values and add it to the data table which is acting as a data source. However, when my OnLoad event is fired on post...

Can I use Silverlight 2.0 with ASP.NET 2.0?

I am working on an in-house tool for interfacing to a database. My current prototyping is written in C# using ASP.NET 2.0 with the intent to optimise some client-side operations using javascript. However, I was hoping to leverage Silverlight to simplify the user interface development. Do I need to have the server upgraded to ASP.NET 3.5...

What is the best menu for an ASP.Net application?

What do you find to provide the best menu for an ASP.Net 2.0 - 3.5 web application? Suggestions do not have to particularly be ASP.Net controls, but could be other menu's that work well within an ASP.Net web application. I would like for the suggestions to be options that do not require purchasing or royalty fees. OpenSource suggestions...

Code to create CAPTCHA code in ASP.NET?

Hi, I want to create a CAPTCHA similar to http://www.gigbooks.com/getcaptcha.php this one. But its in PHP an anyone provide me the code to create the same in ASP.NET ? I am using ASP.NET 2.0 (C#) Thanks, ...

How to configure the timeout of your ASP.NET web application?

My previous experience with ASP.NET web application (regarding the timeout) is that it logouts the user every 30 minutes, regardless of what module is running, Is there a way that we can increase the application timeout to an hour or two? Any help is highly appreciated, thanks in advance. ...

Compile Error CS0433 on pre-compiled ASP.NET 2.0 site.

I keep getting this error ever so often when I launch the debugger to debug my site. I'm using the Telerik controls, and usually the error is in my tab strip. Here is an example of the error I'm looking at right now: Compiler Error Message: CS0433: The type 'ASP.controls_motorvehiclegeneral_ascx' exists in both 'c:\WINDOWS\Microsoft.N...

How do you work with SessionStateItemCollection in C# (ASP.net)

If I store the contents of an xml file (name -> value) in a session collection, whats the best way of accessing it on another page (i.e not the one that the below script runs on). Is it just a job of creating a new instance of SessionStateItemCollection on each page I want to access the collection? System.Xml.XmlDocument oXmlDoc = new ...

exception logging help

I work on a rather large web site. We currently have 4 web servers and an active passive db cluster running asp.net 2.0 with C#. Currently our exception handling is not trapping the correct exception being thrown. I have heard it is because server.getlasterror() is not thread safe (note: we currently do not use server.getlasterror().getb...

Modal Window Problem

Hi I am using modal window for my VB.NET program and i am trying to open this child modal window from another window, afte i close the child modal window i am trying to refresh the parent but i am getting retry/cancel popup, i tried a lot of things to avoid but i can't get rid of this popup :-( is there any way i can avoid this popup? I ...

Best way to create an asp.net page dynamically

Hey guys, i have to create an asp.net page dynamically on runtime. It should work like this: 1) User logs in using <authentication mode="Windows" /> 2) A CheckUser(string Username){} will be send to the webservice which connects to a MySQL database and response with true or false. 3) if the checkuser was true the webservice will chec...

How do I disable downlevel rendering in ASP.NET?

How do I disable downlevel rendering of my ASP.NET 2.0 site? I have a single master-page that all the other pages inherit from, and do not want "downlevel"-versions of the server-controls to be sendt to Google and W3C-validators. The best thing would be if this feature could be disabled for all users on all pages on my site. ...

How to retrieve value and use it in stored procedure in one SQL query?

I am writing a Silverlight client that interacts with an SQL database via ASP.NET 2.0 web services, which I am also developing. One of the services needs to return the results of a stored procedure and it works well. However, one parameter of the stored procedure needs to be retrieved from a different location before the stored procedure...

What is the best way to implement 'Excel like column sizing' for an HTML table?

Basically, I want to allow the user to resize columns in an HTML table, using the same method as you would in Excel. Drag the space between columns and size. I did some research on this last year, and found a few hacks and kludges. Most were pretty bad, and I didn't find anything really good. Now, it looks like I need to implement th...

Alternative Query String C# (asp.net)

Is there a quick and dirty way of using a query passed as follows: domain.com/mypage.aspx/product/toycar/ I've done it before in PHP, but this needs to be done in page (in this instance). -- I only have access to the aspx page and code behind, and have to work in asp.net 2 (i wish i was using 3.5) ...

Detecting a Refresh Operation Immediately Following a RowCommand Event

Hi All. ASP.Net 2.0 The scenario: I have a gridview with a template column with a custom rowcommand image button. In short, the rowcommand fires some code behind which inserts a row into a SQL table with some unique values, then does a RegisterStartupScript which does a window.open. The page in the window.open logs a user in using ...

Troubleshoot a 'Sys' is undefined message in my upgraded web application

I have a web application that was originally written on .Net 1.1 Framework. I have since tried you upgrade it to .Net 3.5 Framework. I am now getting this javascript error throw on my page and for the life of me can't figure out exactly why. I have target the application for the .Net 3.5 framework, and even deleted and added back in th...