asp.net

How to get the Silverlight XAP copied to the clientbin on build

I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted. So everything is fine and...

How do ASP.NET applications work when deployed without the code-behind files?

When you deploy an application to IIS without all files that contains code (VB/C#) then how exactly are events & all things handled? ...

What are the downsides to static methods?

What are the downsides to using static methods in a web site business layer versus instantiating a class and then calling a method on the class? What are the performance hits either way? ...

How to diagnose IIS fatal communication error problem

I've a a customer using IIS and an application, developed by us, in Asp.NET 1.1. Monday, for 4 times in a row the error “A process serving application pool 'xxxx' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was 'yyyy'. The data field contains the error number.” appeared. Any idea about...

How to handle errors in VB Script

I am having an VB Script. I need to log the error information in a file. I need to log every information like error number error description and in which sub routine does the error occured. Please provide some code ...

ASP.NET authentication mode=Forms - so why am I getting a Windows Login prompt?

I have authentication mode set to forms in my asp.net web.config but am still getting a windows login prompt when i browse to the website. Could authentication mode be set elsewhere, in IIS for example? My site runs on IIS 6. Thanks. ...

ASP.Net AJAX uses syntax like $get('myId'), is this standard Javascript or JQuery?

It doesn't look like basic javascript but nor can I use JQuery commands like $('myId'). Is this or similar functions documented anywhere? For reason I don't want to go into, I am not able to use 3rd party libraries like JQuery but if some powerful javascript extensions come with asp then I would like to know about them. ...

ReportViewer control won't allow Exporting

Hi, 1) I have a ReportViewer control on a page that's linked to a ServerReport (I'm using ASP.NET 2.0). The report displays fine, but the 'Export' link is present but disabled and the 'Select a format' drop down list (that's normally visible when you view the report in Reporting Services) isn't there. Any ideas? The ShowExportControls p...

Cookie loses value in ASP.net

I have the following code that sets a cookie: string locale = ((DropDownList)this.LoginUser.FindControl("locale")).SelectedValue; HttpCookie cookie = new HttpCookie("localization",locale); cookie.Expires= DateTime.Now.AddYears(1); Response.Cookies.Set(cookie); However, when I try to read the cookie, the Value is Null. The coo...

Selectively apply css to a row in a gridview

Hi, I'm looking for a way to selectively apply a css class to individual rows in a GridView based upon a property of the data bound item. e.g.: GridView's data source is a generic list of SummaryItems and SummaryItem has a property 'ShouldHighlight'... when ShouldHighlight == true the css for the associated row should be set to 'highl...

Trying to reap the benefits of the Rich WEB.UI.Gridview control in a C# application

I know that I can't use this web control in my C# windows application and that I am restricted to DataGridView control. But this does not display results in an elegant manner as the Web.UI.Webcontrol.GridView control but instead displays it like the results when a SQL query is executed in sql server. I prefer not going down the path of ...

DetailsView web control does not change to insert mode when insert is clicked

I'm binding a hashtable to a detailsview web control in ASP.NET 2.0. I have my edit/delete/insert link buttons on the detailsview, but when clicking new, the mode does not change. Any ideas why? If you need code examples, I will be happy to provide them. Thanks ...

Webform checkbox value in javascript

Hi, I have a checkbox list control on my asp.net web form that I am dynamically populating from an arraylist. In javascript I want to be able to iterate through the values in the list and if a particular value has been selected to display other controls on the page. My issue is that all the values in the checkbox list are showing up ...

How to Show/Hide Panels before executing Response.Redirect

I have a form that kicks off a Response.Redirect to download a file once complete. I also want to hide the form and show a 'thank you' panel before the redirect takes place, however it seems the asp.net engine just does the redirect without doing the 2 tasks before in the following code: if (success) { ...

How to automatically remap .html pages to .aspx pages?

We have a website; which, till now had only HTML pages. Now we are redeveloping it in ASP .Net. This means that all the .html pages will be changed to .aspx extension. The problem is, there are a lot of external references to these pages, and we dont want to go and chage each and every link to aspx right away. Is there any way to redir...

Way to tell if an app is ASP.NET 1.1 or ASP.NET 2.0

How can I tell if an App is ASP.NET 2.0 or ASP.NET 1.1. This is in C# I don't have the source code and I don't have access to IIS Manager. But I can ftp and check the ASPX files. Any Ideas? ...

Hashing data to ensure it wasn't corrupted during transfer

Hi, (under asp.net enviro) I will be sending data to a central server via a web service, and I want to hash the data to ensure that it didn't get corrupted during transfer. Which hash method should I use? Can I hash when the web service is passing objects? ...

CastleProject *.vm HttpForbiddenHandler not work

I try to use HttpForbiddenHandler to block the file without success. The web.config is as follows: <httpHandlers> <add verb="*" path="*.ashx" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework"/> <add verb="*" path="*.vm" type="System.Web.HttpForbiddenHandler"/> </httpHandlers> I have setup the virtu...

HTML Reporting Solution

What good components and packages are available for generating HTML reports based on report definitions? I have a truly horrific project where each report is a dedicated aspx page that builds one fantastically big HTML string, which it then assigns to a 'reportBody' Label control. Standard grids are not a good solution as they provide ...

[ASP.NET] File download does not work with IE7

I have an asp.net page which sends content of a file to the client, so the browser shows the save as dialog to download the file. This page is displayed in a popup and when the user clicks the save button, it closes automatically and the download starts. On windows server 2003, it works fine. On vista with other browsers, also works fin...