asp.net

How long to get up to speed with ASP.NET?

This question is similar to my earlier question. I have used ASP .Net in Visual Studio 2005 about 4 years ago. How long would it take to get back up to speed with the latest versions? ...

Help with ASP.Net error: "Cannot use a leading .. to exit above the top directory"

I'm seeing this error several times an hour on my production site and am not quite sure how to fix it. I've grepped the source code and I am not using "../" anywhere in my code to generate a path. My application is running on IIS6 on Win2003 Server. It's using URLRewriter.Net to allow the site to have friendly URLs, and I'm wondering if...

ListBox retains posted value even after being databound

Please note that the problem described below is almost the exact opposite to the common problem of "my control shows the same value every time the page loads. I understand the behavior expressed is generally not desirable. I have a listbox which is being databound in the page load event even on postback. When the event handler for the...

ASP.NET- Instantiate a Web User Control in App_Code class

Files: Website\Controls\map.ascx Website\App_Code\map.cs I'd like to create a strongly typed instance of map.ascx in map.cs Normally, in an aspx, you would add a <%Register... tag to be able to instantiate in codebehind. Is this possible in an app_code class? I'm using .NET 3.5/Visual Studio 2008 Thanks! ...

Vb6 "Tag" property equivalent in ASP.Net?

I'm looking for ideas and opinions here, not a "real answer", I guess... Back in the old VB6 days, there was this property called "Tag" in all controls, that was a useful way to store custom information related to a control. Every single control had it, and all was bliss... Now, in .Net (at least for WebForms), it's not there anymore.....

How do I fade a row out before postback

I have a table that is created in a DataList in ASP.Net. This table has three fields of text, then a field with an edit button, and a field with a delete button. When a person clicks the delete button, it posts back, deletes the items, and then binds the DataList again. The DataList is in an UpdatePanel so the item smoothly disappears af...

Please wait dialog & downloading files in asp.net

Hello, In my ASP.Net application I have a requirement that when a user clicks on an UI element we generate a PDF for them which they can download. This is currently implemented by doing a form post to an ashx page. This page essentially inspects the form and then executes the correct server side page which either results in HTML or a PD...

ASP.NET: How to set the css class of a Control during DataBind?

A table row is generated using an asp:Repeater: <asp:repeater ID="announcementsRepeater" OnItemDataBound="announcementsRepeater_ItemDataBound" runat="Server"> <itemtemplate> <tr id="announcementRow" class="announcementItem" runat="server">...</tr> </itemtemplate> </asp:repeater> Now in the data-bind i want to mark "unread"...

Is there any kind of file dependency tracer for Asp.Net apps?

I have an Asp.Net 2.0 (VB.Net) app and I'm trying to export a Control (ASCX) to another project. I need to know what other files that the Control needs in order to work. Is there any way - using VS.Net 2005 or an external app - to recursively trace the dependencies of a page or control in a solution? For example, for this file: ~/Cont...

How many active ASP.NET developers are there?

I'm looking for metrics on how many ASP.NET developers are actively using ASP.NET. If you have links to reliable metrics I would be interested to see them. ...

Preferred way to include relative reference to JavaScript in VS 2008 nested Masterpage.

Our base Masterpage has something like the following <head runat="server"> <title></title> <script type="text/javascript" src="<%= Page.ResolveClientURL("~/javascript/actions.js")%>"></script> <script type="text/javascript" src="<%= Page.ResolveClientURL("~/javascript/jquery/jquery-1.2.6.min.js")%>"></script> <asp:content...

Update multiple rows into SQL table

Suppose there is a fully populated array of data String[n][3] myData. I want to do this: for (String[] row : myData) { SQL = "update mytable set col3 = row[2] where col1 = row[0] and col2=row[1];" } Obviously I've left a lot out, but I want to express the idea as succinctly as possible. Is there a simple way of doing this in ...

How does Databind consume a DataReader

If I have a control on a page that has its Datasource set to a DataReader, does that control consume the reader at the time the Datasource is set, or does the datareader continue to exist until Databind has been executed? What actually happens under the covers when Databind is executed? ...

Type 'System.Web.UI.WebControls.SessionParameter' does not have a public property named 'DbType'.

I am using a Session Parameter on an ObjectDataSource. It works fine on the local development machine but I get this error after copying the website to the production server: Type 'System.Web.UI.WebControls.SessionParameter' does not have a public property named 'DbType'. ...

ASP.NET: How to convert <A> or HtmlAnchor to static text?

i have a repeater that will output a series of items: <asp:repeater ... runat="Server"> <itemtemplate> <a href="<%# GetItemLink(...) %>"><%# GetItemText %></a> <itemtemplate> <asp:repeater> But some items will not have an associated link, so i don't want them to be clickable. i tried making it a runat=server HtmlAnchor, an...

w3wp is using lots of memory and the process is not responding.

Can someone give me step by step instructions or point to the correct references in the correct order so I can determine the root cause of this issue? ...

ASP.NET Session Timeout Testing

I'm a doing some blackbox testing of a ASP.Net website and I need to test different session timeout scenarios. I'm not sure they fully encapsulated session timeouts. Other then leaving a page open for 20 minutes is there an easier way to force a session timeout? ...

ASP.NET session and storing objects that use COM interop

I'm working on an asp.net web site. We have to use com interop to interact with legacy vb6 activex components. The components in many cases rely on receiving a context object (which is itself a vb6 activex component) as a parameter. The context object is fairly costly to construct. Therefore one idea is that a context object is const...

Which Facebook .NET Library is the best to use?

There is a list of projects here, mainly the Facebook Developer Toolkit and Facebook.NET. However, I've seen a lot of negative feedback about the toolkit and it seems like Facebook.NET hasn't been upgraded to the latest facebook API. Are either of these worth using? Any other good libraries out there? Specifically I'm looking to use t...

How do I resolve "%1 is not a valid Win32 application"?

Environment: Windows Server 2003 R2 Enterprise 64bit, SP2 .NET framework is supposedly installed (2.0 SP2, 3.0 SP2, 3.5 SP1) I say "supposedly" because they are listed as installed under Add/Remove programs. I'm not sure it's properly installed, because the "ASP.NET" tab isn't added to any of the sites in IIS. In the IIS Web Service Ex...