asp.net

asp:UpdatePanel with an ASP.NET checkbox trigger

What is the EventName property when I set up a ASP.NET checkbox control as an async postback trigger for an asp.net update panel? ...

How do you handle multiple web.config files for multiple environments?

The way I currently handle this is by having multiple config files such as: web.config web.Prod.config web.QA.config web.Dev.config When the project gets deployed to the different environments I just rename the corresponding file with the correct settings. Anyone have suggestions on how to handle this better? EDIT: Here are some of ...

Can someone help me with an AJAX race condition that leaves buttons disabled?

I have an AJAX problem. There are some button on the ASP.NET page that I think gets disabled and re-enabled on a postback, which needs to be done for other reasons. There are 2 dropdown menus inside an updatepanel that will use the AJAX. The first dropdown menu updates the second one. There is a client side onblur on the first dropdo...

injection user control depending on radio button choice (ASP.NET MVC)

I have this Create Event form (asp.net mvc), and i have to change some parts of the form, depending on user's choice. When the user clicks radio buttons, different user controls (ascx files) should be injected inside the form hopefully using Ajax. Any suggestions to do this? ...

Downloading files

Hello, I am using asp.net/C#. I have a url to a folder on a remote server. In that folder are images that are all .jpgs. I don't know the names of the files, just that they are all .jpgs. How do I download all the .jpg images using asp.net/C# to a folder on my local hard drive. Just to clarify. I am pulling files from a remote server a...

@“Data Source=(local)\ SIRSYSTEM \ HEY;” – can’t connect if a string includes SIRSYSTEM

Hi The name of my MS Sql server instance is HEY, but when trying to log on to Sql server via Microsoft Sql management studio, the login window displays as the name of a server "SIRSYSTEM\HEY". What is SIRSYSTEM? A name of default server instance? If so, then why can’t I connect to HEY using the following connection string ( in Ado.n...

Is there a way to set a asp.net button's CommandArgument in javascript?

I have a GridView that lists a bunch of items and one of the columns has a link that displays a modal (AjaxToolkit ModalPopupExtender). Let's call that link "Show". In that modal, I have a asp:button for saving the data entered in that modal. Let's call that button "Save" So when the user clicks on a "Show" link in a certain row, I'd ...

What causes the System.Web.HttpException with error code 0x80070057 on Page.Flush while debugging in VS2005?

Here is the complete error message: An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code Additional information: The remote host closed the connection. The error code is 0x80070057. and the offending code: char[] buffer = oPage.HTML.HTML.ToCharArray(); Page.Re...

ASP.NET FileUpload Control - Security concerns when buffered to disk

The MSDN states that when a file is uploaded using the ASP.NET ( v.2.0 ) Fileupload control or the underlying HttpPostedFile that "Files are uploaded in MIME multipart/form-data format. By default, all requests, including form fields and uploaded files, larger than 256 KB are buffered to disk, rather than held in server memory." MSDN Lin...

Add new columns in asp .net application

I am facing this question in a new little project: The system to be built will allow user to add new columns to a table in the system, and then the user will be able to maintain the data, I think there is two ways to implement this: 1) create a few tables including "columns" table with "columnName" "columnValue" "datatype" etc to store t...

Why can’t I use a SqlConnection instance until the SqlDataReader is closed?

Hi, From MSDN: While the SqlDataReader is being used, the associated SqlConnection is busy serving the SqlDataReader, and no other operations can be performed on the SqlConnection other than closing it. This is the case until the Close method of the SqlDataReader is called. For example, you cannot retrieve output parameters until af...

When is it best to use a new class rather than add to an existing class

I have a class called Player in the business layer of my web application. Player class has fields PlayerID, CategoryID and CountryID A function in Player Class calls a function in PlayerDB Class in the Data Access Layer which in turn calls a stored proc which returns data for PlayerID, CategoryID (foreign key to Category table) and Cou...

How to implement A simple AJAX call using asp.net page?

Hi, I'm trying to implement this specific example using asp.net page instead of asp page. If you look at the example you can see that there are 2 parts for the page: Mail asp page. This page have JS code that calls other asp file for AJAX use. the other asp page which holds the JS code. The responseText of the call is the client sid...

Role-based profiles for CAS

Introductory ramble Client Application Services (CAS) is the Microsoft solution for ASP.NET and WCF identity management. The default store is XML but nearly everyone reconfigures it to use ASPNETDB on MSSQL. There is support for per-user information in the shape of the .NET Profile. Within this, the application developer can define an ...

asp.net sqldatasource detailview: how to set proper select statement

My page load event looks like this.... SqlDataSource1.ConnectionString = Connection.ConnectionStr; SqlDataSource1.SelectCommand = "select firstname,lastname from customer"; SqlDataSource1.InsertCommand = "CustRec_iu"; SqlDataSource1.InsertCommandType = SqlDataSourceCommandType.StoredProcedure; SqlDataSource1.Inse...

IIS - Different processing of default document in Integrated Pipeline mode?

Hi all, I have an HTTP Module to handle authentication from Facebook, which works fine in classic pipeline mode. In integrated pipeline mode, however, I'm seeing an additional request pass through for the default document, which is causing the module to fail. We look at the request (from Facebook) to retrieve and validate the user a...

Having problems with grabbing image dimensions with jQuery

I'm having a hard time picking up how to grab the dimensions of an element with jQuery. Here is my sample code: $(document).ready(function() { var width = $("#image_1").width(); var height = $("#image_1").height(); document.write(width); document.write(height); }); Now of course I have an image wi...

ASP.net controls: Browser compatibility

Hi, I'm using some ASP.net controls in my project especially WEbcombo,Grid(for inline editing) and i face t working good in firefox and IE6 but not in Safari(throwing exceptions). so i just wanna know or want a list of ASP.net controls which could not work(if any) in safari(not compatible) Can u help me in this? Or do u have anything...

oo-spaghettio web architecture

I've noticed that the majority of enterprise web apps I've worked on over the past few years have seemingly mis-used the powers of oo. That is, what once would have been perhaps 1000 lines of HTML and script, has often now morphed into 10,000 lines of code, 50 classes, and 2000 method calls to do basically the same thing. I.e. oo and l...

Get MasterPage Hiddenfield Value From a User Class

Is there a way to get a value I am storing in a Master Page hidden field from a User Class which I created and placed in the App_Code folder of my ASP.Net 2.0 Application? Some examples would preferably in VB.Net is highly appreciated. Thanks. To give further details, assume the following: MasterPage.Master MasterPage.Master.vb MyPa...