asp.net

Eventhandling in ascx usercontrols

What is best practises for communicating events from a usercontrol to parent control/page i want to do something similar to this: MyPage.aspx: <asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceholder" runat="server"> <uc1:MyUserControl ID="MyUserControl1" runat="server" OnSomeEvent="MyUserControl_OnSomeEvent" /> ...

Persisting Checkbox State Across Postbacks

I have a web form that binds a DataGrid to a, normally, different data source on each postback. I have a static CheckBox column that is always present to the left of the autogenerated columns. I achieve a TabControl effect with a horizontal Menu control above the grid, with each menu item being a tab that contains a different grid. No...

Want to write to a file, but may have potentially multiple writers at once, need to lock.

Hi, In a asp.net web application, I want to write to a file. This function will first get data from the database, and then write out the flat file. What can I do to make sure only 1 write occurs, and once the write occurrs, the other threads that maybe want to write to the file don't since the write took place. I want to have this wr...

How to disable browser postback warning dialog

I have an asp.net application that runs exclusively on IE7 (internal web site). When a user needs to enter data, I pop up a child window with a form. When the form closes, it calls javascript:window.opener.location.reload(true) so that the new data will display on the main page. The problem is that the browser complains that it must re...

Get Accordian Selected Index in ASP.Net C#

Im working on an ASP.Net app with c#. I am stuck on a problem with an accoridian. My accordian correctly displays data from a datasource which in this case in some text and then a list of images. On each accordians content there are the images to be displayed and then a button to add another image. This button links to another page t...

Infragistics WebTextEdit - Setting value in Javascript function

Hi all. I'm currently using the Infragistics component set for .Net 2.0, Visual Studio 2005 and C#. I have the following chunk of javascript code (text and other variables are declared elsewhere): ***alert(box[select].value); text.value(box[select].value); alert(text.value);*** 'text' is an Infragistics webTextEdit, whi...

How to use system_user in audit trigger but still use connection pooling?

I would like to do both of the following things: use audit triggers on my database tables to identify which user updated what; use connection pooling to improve performance For #1, I use 'system_user' in the database trigger to identify the user making the change, but this prevent me from doing #2 which requires a generic connection ...

How do I explicitly set asp.net sessions to ONLY expire on closing the browser or explicit logou?

By default the session expiry seems to be 20 minutes. Update: I do not want the session to expire until the browser is closed. Update2: This is my scenario. User logs into site. Plays around the site. Leaves computer to go for a shower (>20 mins ;)). Comes back to computer and should be able to play around. He closes browser, which de...

What can cause an ASP.NET worker process to be recycled?

Here is my current question: I'm guessing that my problem (described below) is being caused by ASP.NET worker processes being recycled, per the answers below—I'm using InProc sessions storage and don't see much chance of moving away, due to the restriction for other types of storage that all session objects be serializable. However, I c...

How are you using the Machine.config, or are you?

For ASP.Net application deployment what type of information (if any) are you storing in the machine.config? If you're not using it, how are you managing environment specific configuration settings that may change for each environment? I'm looking for some "best practices" and the benefits/pitfalls of each. We're about to deploy a bran...

Testing the UI in an Asp.net Page?

What's the best way to automate testing the UI in an Asp.net Page? ...

How to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls)

I want to change the Text of the browse button in the FileUpload Control (System.Web.UI.WebControls), instead of the [Browse...] text I want to use [...] ...

Parser error when using ScriptManager

I have an ASP.NET page which has a script manager on it. <form id="form1" runat="server"> <div> <asp:ScriptManager EnablePageMethods="true" ID="scriptManager2" runat="server"> </asp:ScriptManager> </div> </form> The page overrides an abstract property to return the ScriptManager in order to enable the base page...

Anyone knows a good beautifyer for VS2005 / ASP.NET markup?

I'm looking for one those to help me in my fight against Visual Studio's propension to bollock up markup code in ASP.NET pages (especially when coming back from design view.) I might be old-fashioned, but I like be able to tell at a glance which element nests in which. Or, alternately, is there an option to turn that feature (markup ...

In ASP.Net, during which page lifecycle event does viewstate get loaded?

I know it happens sometime before Load, but during what event exactly? ...

Need a free datepicker for ASPX

What is the best FREE Datepicker that can be dropped into an ASPX application? ...

What is the most accurate method of estimating peak bandwidth requirement for a web application?

I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple answer like "you'll need a dedicated T1 line" would probably suffice, but I'd like to have...

storing state across postback

What is the best way to store string data across postback. I need to store an ID and name for multiple entities. I was thinking of using a datatable in viewstate, but would that make viewstate grow too large? I can't use a database yet because I'll be inserting a record that those other records need to be related to. So I'll just be ...

Where is the best place to store user related data in asp.net?

When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session variable or customize the membership user and membership provider to contain this infor...

What is the easiest way to convert from asp classic to asp.net?

I am a .Net developer that has been tasked with upgrading a classic asp website to asp.net. The website is currently running on luck and bubble gum but there is not enough time or money to stop progress and do a full rewrite. Of course I will still need to be able to deliver new features while I am upgrading. What strategies should I us...