asp.net

jQuery Function Question

Hello, I have a question concerning functions with jQuery. I have a function that once the browser is ready the function finds a specific table and then adds hover & click functionality to it. I am trying to call this function from code behind in an asp .net page due to the fact that once someone adds to the database the update panel ...

How to make a dropdownlist disabled on change event using JQUERY ?

$(document).ready(function() { $('#<%=ddlContinents.ClientID %>').change(function() { var element = $(this); var totalLength = element.children().length; if ($(this).disabled == false) { $(this).disabled = true; } }); }); What I am trying to do is fire off the change event of the dropdownlist and on chan...

Broken accent characters when Copy / Paste into ASP .Net

I am copy pasting from an MS word document into an ASCX file. When I view the ascx file, the accented characters appear normally. BUT, when the page is rendered through my ASP.net application, the accented characters are broken: Une promenade dans un verger ensoleillé, un peau de pêche délicatement parfumée… Les plaisirs du pr...

Can you print JavaScript variables from a Visual Studio 2008 Tracepoint?

After learning about how to print out debug messages using Visual Studio's Tracepoint feature, I was curious to see if it worked in JavaScript files. So far, it does and it doesn't. If I am editing a .js file in VS 2008, I can click on the margin to create a breakpoint. I can then right-click the breakpoint and select "When Hit" and the...

Maintain List<> state across page boundaries in ASP.Net

I have an ASP.NET WebForms application that has a feature that requires the user to provide data in multiple steps. This is currently implemented using multiple pages. So, the user visits step1.aspx, provides some information, and then is redirected to step2.aspx to provider additional information. The objects that are manipulated a...

HyperLinkField not showing as link

I have the following column in a GridView, and my problem is that it only renders the text "Download", not a URL. <asp:HyperLinkField DataNavigateUrlFields="ArchiveLocation" Text="Download" DataNavigateUrlFormatString="{0}" /> When I bind a DataTable with one row to the grid, the ArchiveLocation in that row contains the value: "~/...

TreeView CSS Friendly Output? Control Adapters? ASP.NET 3.5

I want my TreeView control to output <ul><li> tags instead of <tables>. What is the best way to do this. I heard about the CSS Control Adapters. Is this still the best way? How do you go about doing it? ...

Refresh schema won't retrieve columns

hi Can you give me some advice on how to enable refresh schema so I can use it to (re)generate GridView columns: With ObjectDataSource controls refresh schema link works ( thus retrieves information from data source ) only when I change a property in a data source ( for example, if I make public property into private one ) and then re...

Can server-side viewstates fix one of the biggest problems with ASP.NET?

Hi, I've read a few SO articles about whether or not ASP.NET MVC is worth the migration from "regular" ASP.NET. One of the biggest reasons for using MVC I've seen quoted was not having to use Viewstates. However, it is possible to eliminate viewstates by storing the viewstate information on the server as this article shows. I've tried...

How do I setup an ASP.NET project *WITHOUT* using the Visual Studio GUI?

I'm using Emacs and Mono on Windows so that I can retain the same development environment while I'm in GNU/Linux. So I need to know what the directory structure of an ASP.NET project and which files are critical to its operation (config files, etc.). ...

Bad Request (400): Why?

Why do I get a 400 - bad request error using the following URL? It is encoded using Server.UrlEncode. The actual path query parameter is C:\Development\Chase\Exports\ChaseExport-090312073930.zip http://localhost:50199/Common/Forms/Export_Stream.aspx%3fpath%3dC%3a%5CDevelopment%5CChase%5CExports%5CChaseExport-090312073930.zip ...

Custom IPrincipal together with WindowsAuthentication

Is there any good way of combining ASP.NET Windows Authentication with a custom IPrincipal/IIdentity object? I need to store the user's email address and have done so for Forms Authentication using a custom IIdentity/IPrincipal pair that I added to the Context.CurrentUser during the AuthenticateRequest event. How would I best go by to ...

How to make usercontrol available to multiple projects?

I have a set of UserControls in a ASP.NET website that I would like to share to multiple website. But it seems we are unable to create a class library with UserControls in it with the ascx file. While MSDN suggest building a Web Control, I Would rather find a way to share the existent controls instead of destroying them to create new web...

How do I fire an ASP.NET custom validator from JavaScript?

I want to code a function in javascript that every time I call it in the webform it fires up an specific validator in that same webform. ...

Asp.net assembly reference error

A web app that I'm writing throws this compiletime error Error 1 The type or namespace name 'Web' does not exist in the namespace 'ATS.System' (are you missing an assembly reference?) for every code file in the assembly the namespace is imported in every file (both System and System.Web) I've also added references (to both) in th...

Web Services for Remote Portlets in C# / .NET -- Options?

I recently had my mind expanded by a new concept: Web Services for Remote Portlets, or WSRP. I learned of it during a presentation on a Java-based web portal we are considering purchasing at work; we are a .NET shop and WSRP would be the means by which we would extend this portal. Although I cannot control the end decision as to whethe...

Running an MVC Application as a Sub-Application?

I'm attempting to create an MVC application as a sub-application to my standard Asp.Net Web application. Both of these projects are inside the same solution. While the parent application appears to be going fine, I'm having trouble getting the sub-application to work. After some massaging of my two web.configs, I was able to get the Asp....

How do I determine if an "IIsWebDirectory" or "IIsWebVirtualDir" is an ASP.NET Application?

I am currently writing an C# asp.net application to connect to an IIS server and query the virtual directory/web directory information. I am able to determine that there are that two types I should be dealing with is an "IIsWebDirectory" and "IIsWebVirtualDir". How to I determine if they have been configured to be an "application" in C...

How do I loop through a PropertyCollection - C#

Can anyone provide an example of how to loop through a System.DirectoryServices.PropertyCollection and output the property name and value? I am using C#. @JaredPar - The PropertyCollection does not have a Name/Value property. It does have a PropertyNames and Values, type System.Collection.ICollection. I do not know the basline object...

Changing the Log4Net Root Level When App is built as Release

I have a project I am working on using log4net, and it works great, but I want to know if i can override the XML configuration for the root "level" attribute for the logging when in debug and release. Currently my root configuration looks like: <root> <level value="WARN"/> <appender-ref ref="LogFileAppender"/> <appender-ref ref="...