Questions for asp.net


4362

Inline C# code vs Page_Load method

I am working on an ASP.NET Web Application.
8019

VB.NET and ASP.NET DLL line numbers don't appear in production error logs

I can see line numbers in my error logs in our development environment, in which VB.NET 2005 and ASP.NET components are compiled in debug mode, with PDB files copied to the server on deployment.
1800

Trouble encoding a u umlaut with in a .Net http handler

I have a JavaScript request going to a ASP.Net (2.0) HTTP handler which passes the request to a java web service. In this system special characters, such as those with an accent do not get passed on
1801

RESTful web service returning XML not JSON

I have this simple web service, right now it just looks to see if the part number is A123456789 and then it returns a model number. This will be replaced by logic that will be connecting into a dat...
2735

Twitter bootstrap + asp.net masterpages, how to set navbar item as active when user selects it?

We are in se same situation as question Make Twitter Bootstrap navbar link active, but in our case we are using ASP.net and MasterPages...
7889

Twitter Bootstrap Buttons - Server Side code

I want to use a twitter bootstrap button and add a Button Click event to it in ASP.NET / VB.NET in my code behind. Obviously the difference between the twitter button is that it is just a HTML inpu...
372

JQuery with MasterPage in ASP.NET

I'm trying to use JQuery with some asp.net pages, that use master pages, and I'm having problems with loading the JQuery javascript file.
2155

asp:RequiredFieldValidator causing extra line in aspx page

I have simple ASPX page with few text buttons/drop downs. For almost every text button/drop down, I have the validators.
4794

When Selecting Multiple Values in Listbox getting exception Index was outside the bounds of the array in Linq to Entity

I have a multiple values in ListBox. When I am Selecting a Single Value my code is working fine.
2907

repeater control. find the table cell

i had kept repeater control inside Update panel. The control is having 4 columns. based on the value i have to show \ hide the 3rd column. the columns were placed inside table <tr> and <td...
3383

How to Apply a CssClass to a series of similar objects with a different ID

I have a large application in which I have lots of Submit - Delete - Cancel - Add and .. buttons. All of them use a same .Button CssClass.
3052

Deserialize json having different format

I have two different type of JSON .Can any one tell how I can deserialize both?
319

Localize Images in ASP.NET

A couple of years ago, we had a graphic designer revamp our website. His results looked great, but he unfortunately introduced a new unsupported font by the web browser.
1122

Best Language for Windows 2000-based Website

I've been contacted to see about updating an old legacy web application that was built using ASP and Access. The server is running Windows 2000 Advanced Server and I believe IIS 5.0 (I am trying to...
639

ASP.NET: Custom client-side validator for “one of two fields must be filled”?

Can you tell me if there anybody has implemented a custom validator for checking that one of two (or N) input fields are filled?
1737

HttpRuntime.Cache vs Application

I know that most people recommend using HttpRuntime.Cache because it has more flexibility... etc. But what if you want the object to persist in the cache for the life of the application? Is there a...
3546

Dropdown issues with Twitter Bootstrap when used in Asp.Net MVC3

I was playing with MVC3 Asp.Net and trying to implement the Twitter Bootstrap into the project. I got the basic thing working but not the dropdown. I have the following html code
2909

How to host multiple ASP.NET websites on one shared hosting account?

With PHP, I can make numerous PHP websites locally and then upload each of them to its own sub-directory of my PHP hosting service.
1247

ASP.NET MVC - User access for directory

How can I add limited access to only 1 specific user has access to 1 specific directory and none else can access it than him? I've looked at the web.config thing but that wont work.
1900

Server.Transfer vs. Context.RewritePath

I understand they both don't change the URL that the client sees. Is there anything in them that makes one of them preferable over the other?
2180

Web Form Validator Layout Issue

I have a Div that holds a RadioButtonList with 2 values and a required field validator.
6818

jsonp callback function not getting called

I am doing a cross domain AJAX call with dataType as jsonp. I have set the Jsoncallback querystring parameter in the URL. However, the callback function is not getting called at all and instead the...
6768

Can some one help me solve this logic using C#

Below is the logic for what I am trying to do .Can some one help me solve this using C#.
5424

Host to use Microsoft Visual SourceSafe or CVS on web hosting for development?

Host to use Microsoft Visual SourceSafe or CVS on web hosting for development?
4439

No connected between view and controller

I'm a newbie and I tried finding a solution of this error message:
2249

Generate WebService producer from WSDL in Visual Studio 2005

I have a WSDL file defining the interface for a web service and I want to implement that service (i.e. producer/server code) using C#, ASP.Net and Visual Studio 2005. Setting up a Web Reference as
917

SliderExtender with BehaviorID is not rendered after pageLoad(), but work after postback

I'm using a asp.net slider inside an UpdatePanel within a page control.
2667

How can I avoid SQL injection attacks in my ASP.NET application?

I need to avoid being vulnerable to SQL injection in my ASP.NET application. How might I accomplish this?
6973

explaining the parts of the ldap string “LDAP://DC=amrs,DC=win,DC=ml,dc=COM”

can someone explain the makeup of the ldap string parts.
1265

Changing ASP.net application root?

So, ASP.net has the concept of an 'application root'. It is the path part of the URL that corresponds to the root directory that is set for an application in IIS. The tilde character (~) maps to ...
961

ASP.NET Application to authenticate to Active Directory or SQL via Windows Authentication or Forms Authentication

I am in the process of writing an application that will need multiple forms of authentication.
1186

Form element messes up imported HTML/CSS layout template in ASP.NET

I want to use this pure HTML/CSS template for my ASP.NET website:
4811

Where do I cache ASP.NET data to avoid Application state being reset?

I have an application that performs complex queries against what amounts to data organized in a "star schema". The gold-owner keeps adding new "axes" to perform searches on, with the result that
6623

Input to SQL Stored Procedure

I am trying to grab a querystring from the URL and send it to my stored procedure in MSSQL. The querystring is of type varbinary and when i try to send it my application is throwing an exception. I...
6136

Finding the File Version of a COM DLL using ASP.NET

I have a software diagnostic page on which I would like to list the File Version information of a couple of COM DLLs. The page is running under the normal, restricted ASP.Net account (NETWORK SERVI...
2101

SignalR Stops Working for Certain Users

We have a SignalR application that is up and running, and has been very reliable to date. A new user started access it and finds that updates stop being received about 1-2 minutes after the page l...
1544

Get DropDownList value in javascript

I have a DropDownList called ShippingList and when a value is selected, I want to pass that value into the variable simpleCart.shippingFlatRate. I tried creating a var and getting the selected val...
9406

Tips to Improve perfomance in ASP.net?

In my one of interview questio ask by interviewer.
2272

html helpers text input and line break

public string BannerText {get;set;}
5529

Sending asp.net page content to Microsoft Word using contenttype

I have an Asp.net page, and I'd like to send it's content (ie. the rendered page) to open in Microsoft Word. I have the below code in my Page_Load event.
1790

Annoying duplication in derived classes

In every form we derive from FormBaseControl, we have the following code. I'm sure there is a better way to type the controller object than this, but at the moment we have it included in every pag...
3297

Architecture for Reporting Web Site

I've alluded to this project before, in this question, but the scope of redesign has been slightly tightened, i.e. I can't redesign the whole thing, so I 'd like some general advice on how to struc...
107

ASP MVC Routing with > 1 parameter

I have the following route defined
1012

repeatedly call AddImageUrl(url) to assemble pdf document

I'm using abcpdf and I'm curious if we can we recursively call AddImageUrl() function to assemble pdf document that compile multiple urls?
3276

PostBack DataBind error: “Ensure that the control is added to the page before calling DataBind.”

I have a program that allows the user to use a few dropdowns to pick a topic and attribute, then the data are pulled that match on both of those conditions. In the gridview are a lot of templatefi...
2823

asp.net dropdownlist static listitems

im working on an asp.net website with c#.
8625

Enumerate all controls in the form

private void EnableControls(bool enable)