asp.net

Cannot get Textboxes in dynamically added usercontrol to maintain state

I have tried what seems like everything - I've done similiar things many times before, but I'm obviously missing something. I have a UserControl (ucA) - on ucA is a LinkButton that loads a different UserControl (ucB) programatically into a panel on ucA. ucB has TextBoxes, etc. Could someone please help me be sane again? :-) Why isn...

Get GridView selected row DataKey in Javascript

I have GridView which I can select a row. I then have a button above the grid called Edit which the user can click to popup a window and edit the selected row. So the button will have Javascript code behind it along the lines of function editRecord() { var gridView = document.getElementById("<%= GridView.ClientID %>"); var id = // s...

Dynamically Set the Height of Two floated DIVS

The coding is done using VS2008 There are two divs in my page namely "dvLeftContent" and "dvRightContent". I cannot statically set the height of the pages since "dvRightContent" have variable heights on various pages (Master Pages are used here) Is there a client side function(javascript or jquery) that takes the height of the right div ...

Application_Start works fine on workstation, is not called when deployed

I have an application that works great on my development workstation but fails when the application is deployed to the live environment. It seems that Application_Start is not being called in the live environment. ...

.NET Web Service & BackgroundWorker threads

Hi Folks, I'm trying to do some async stuff in a webservice method. Let say i have the following API call: http://www.mysite.com/api.asmx and the method is called GetProducts(). I this GetProducts methods, i do some stuff (eg. get data from database) then just before i return the result, i want to do some async stuff (eg. send me a...

install ASP.NET + SQL Express in a script

Hi Guys, I need a little help on this subject. I have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client? how can I write a script that will create a new database, restore the bak file into that database, set up I...

Finding browser local time in ASP.NET

How do you find out the local time of the user browsing your website in ASP.NET? ...

ASP.NET - Invalid postback or callback argument. Event validation is enabled using '<pages enableEventValidation="true"/>'...

I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side. How do we fix this? Error details below: Server Error in '/XXX' Application. -------------------------------------------------------------------------------- Invalid postback or callba...

Which is fastest? Data retrieval...

Is it quicker to make one trip to the database and bring back 3000+ plus rows, then manipulate them in .net & LINQ or quicker to make 6 calls bringing back a couple of 100 rows at a time? ...

Session in Asp.net

When we add a variable to ASP.NET Session, where are those variables actually stored on the client side? ...

jQuery - Ajax

Hi. In A.ascx I have one DropDownList and one DIV. The DropDownList is populated dynamically. How do I load B.ascx into the DIV, when the user changes the selected index in the DropDownList. This should be done on the client side without postback, by using jQuery and Ajax. Thanks ...

Is there a single resource on the web that lists all ASP.Net security issues (XSS, etc) with preventative measures?

With so many ways to attack a site, it would be useful if there is a single guide, or resource, listing all known vunerabilties with possible preventative measures. Does anyone know of any? Also, is there a library or framework that can deal with this kind of thing? ...

RE: Using themes with ASP.Net MVC

I have an ASP.NET MVC (Beta 1) website that I'm using themes with. When I start my site (I'm still running using the ASP.Net Development Web Server) the default page gives me this error: Server Error in '/' Application. Using themed css files requires a header control on the page. (e.g. ). Description: An unhandled exception occurred...

ASP.NET 3.5 Back-Button Control / Refresh Control (never found a working solution)

Hello and thanks for your time. I've spent quite a bit of time searching for an answer to the old question of preventing duplicate posts when the user navigates back, forward, or refreshes the page. I've seen quite a few solutions proposed, none of which are working. Proposed solution #1) Many people offer ways to instruct the browser ...

Why is the PopupControlExtender generating a full postback inside an UpdatePanel?

I have a button inside an updatepanel. I have a PopupControlExtender linked to the button so when the button is clicked a panel pops up. It works fine except it does a full postback and I can't figure out why. The button and the PopupControlExtender is inside an update panel which inside the ContentTemplate tag. When I take out the Popup...

VS Design Time User Control CSS Duplication

I want to avoid the duplication of stylesheet link tags in the output html when a user control is dropped onto an aspx page. However if you omit the stylesheet link tag you don't get design time support for the stylesheet. Anybody know a way around this problem? ...

ASP.NET and Flash - can flash talk to .net

Can a flash front end talk to a .net backend? ...

Outputing a manipulated QueryString in c#

Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something like: &hello=world&microsoft=sucks But when I use this code to clone the collection to another object (of the same type) I get the Type() back from the ToString() method instead. System.Collections.Specialized.NameValueCollection ...

ASPX Textbox: Execute method on return keypress

I have a search box that doesn't have a submit button, I need to be able to hit enter and then execute a method, how do I do this? ...

Many-to-many relationships in ASP.NET Dynamic Data

Hey, I need to use a many to many relationship in my project and since Dynamic Data doesn't support it natively, I would like to ask for a sample of an implementation of something like it. I'm specifically looking for a way to both create new instances of the target entity and add a new m2m relationship to a record as well as using exi...