asp.net

How do I use jQuery to insert a <DIV> wrapped around a variable number of child elements?

I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol> <li> <label>Some label</label> <one or more form controls, ASP.Net controls, labels, etc.> </li> <li> <label>Another label</label> <... more of the same...> </li> ... </ol> I'm trying to keep my markup as ...

Using AJAX callbacks with ASP.NET User controls

What's the best way to implement user controls that require AJAX callbacks? I want to accomplish a few things: Have events done in the browser (eg, drag and drop) trigger an AJAX notification that can raise a control event, which causes code on the page using the control to do whatever it needs to do (eg, change a value in a database...

Design Time Attribute For CSS Class in ASP.net Custom Server Control

Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom control that is essential a client detail collection form. There are to be a series of elements to this form that require various styles applied to them. Ideally I'd like the VS 2005/2008 properties interface to be able to apply the CSSClas...

Why global.asax Application_Error method does not catch exceptions thrown by ASMX service?

And how to fix it. I'd like to log every thrown exception for maintenance purpose. ...

DataGrid Paging Problem in IE

I have a single templated column in a DataGrid, in an ASP.NET 2 web sites. The DataGrid is paged, with ten rows per page. In Firefox, all is good, as nearly always, but when I view the site trough IE, I get the following exception: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ ...

How can I execute javascript from the server when using asp:UpdatePanels?

I used to do the following to execute javascript from the server: Page.ClientScript.RegisterStartupScript( ... ); And it would execute when the page loads back at the client. I am now modifing existing pages to use UpdatePanels and my javascript is no longer being fired. ...

Adding textbox in SQL Reporting services (Dynamically)

I am having a problem like that i am having some 10 parameters. I am dispalying the parameter values in the textbox(10 different). I need to display the textbox based on my parameter values If the parameter has values - show them in textbox If the parameter has no values - hide the textbox. Currently I am using this above mentiond meth...

Is Donut Caching working properly with ASP.NET MVC?

And by donut caching, I'm refering to Scott Guthrie's blog post which is awesome. Does anyone know if that works properly? ...

The best 3rd party component for generating Excel spreadsheets from ASP.NET?

I want to generate simple excel spreadsheets with only tabular data that opens in excel when the user clicks a button or a link on a asp.net page. I would like suggestions of good 3rd party components that generates the excel file. A must: native 97-2003 xls files, simple, not expensive. Don't want: office automation, csv/html/text-so...

Logging a user out for a single web application page

This is an extension of my earlier XSS question. Assuming that there isn't a Regex strong enough to guarantee XSS saftey for user entered URLs I'm looking at using a redirect. (Although if you do have one please add it under the other question) We have user input web addresses, so: stackoverflow.com They want a link to appear fo...

Caching delegate results

I have a C# method which accepts a Predicate<Foo> and returns a list of matching items... public static List<Foo> FindAll( Predicate<Foo> filter ) { ... } The filter will often be one of a common set... public static class FooPredicates { public static readonly Predicate<Foo> IsEligible = ( foo => ...) ... } ...but may ...

Displaying totals in the ListView LayoutTemplate

I'm using the ListView control (ASP.NET 2008) to show a bunch of lines of data, and at the bottom I want some totals. I was initially going to define the header and footer in the LayoutTemplate and get the totals with some local function, i.e. <%#GetTheSum()%>, but it appears that the LayoutTemplate does not process the <%#...%> syntax. ...

What is the best VOIP toolset for use with .Net development?

I have a need to explore VOIP integration into a .Net application. It would be incredibly helpful if the toolset was usable via ASP.Net (version 2.0 or higher), and provided the developer the option to allow interaction on the client either embedded within the web browser or external to the client web browser. It should be compatible at ...

ASP.NET MVC URL generation performance

A little benchmark with ASP.NET MVC. Viewpage code: public string Bechmark(Func<string> url) { var s = new Stopwatch(); var n = 1000; s.Reset(); s.Start(); for (int i = 0; i < n; i++) { var u = url(); } s.Stop(); return s.ElapsedMilliseconds + "...

ListView with LINQ Datasource insert template

It seems like this should be straightforward but I'm boggling. I've got my listview all setup and bound to my LINQ datasource. The source is dependent on a dropdown list which decides which branch information to show in the listview. My edit template works fine but my insert template won't work because it wants the branch ID which I w...

Is there a way to keep files in App_Data from overwriting newer files when publishing?

I use an XML file in App_Data in conjunction with a Repeater on the main page of an intranet application allow me to display messages to users when they logon about application status, maintenance, etc. To test the functionality, it would be nice to have the file in the App_Data folder under development, but if I do this it copies it ov...

Resetting height of an HTML element via CSS

I use a custom-built asp.net control that renders to a DIV and has "height='0'" hard-coded into the element (I know.. stupid). But I need to reset it - get rid of the height assignment somehow. Is this doable with CSS? I can set the height to 100px for example, and it works. But that's not what I want - I want the height assignment r...

How to detect SqlServer connection leaks in a ASP.net applications ?

I'm currently doing some GUI testing on a ASP.net 2.0 application. The RDBMS is SQL Server 2005. The host is Win Server 2003 / IIS 6.0. I do not have the source code of the application because it was programmed by an external company who's not releasing the code. I've noticed that the application performs well when I restart IIS but a...

Is there a way to access both a root App_Code folder and an App_Code folder in a sub directory in IIS 7.0?

I would love to be able to have a common set of Classes in my root App_Code folder, which is how we are set up right now. However, it doesn't make sense to put specific code there for some application residing in a sub directory. Root Folder App_Code SubDirApp1 App_Code SubDirApp2 App_Code We currently have each production ap...

Where is the official, extensive, complete documentation on web.config?

I'm trying to find about ALL the possible options that I can set in web.config. Surprisingly, I can't find this at all (i'm expecting it to be somewhere inside msdn.microsoft.com) I know I can technically add "anything" to web.config, what i'm looking for is the things that the .Net Framework "as shipped" uses. In particular, right now...