asp.net

Why does the javascript onchange event not fire if autocomplete is on?

I have a textbox with an onchange event. Why does this event not fire when the user uses the autocomplete feature to populate the textbox? I am working with Internet Explorer. Is there a standard and relatively simple solution to workaround this problem, without me having to disable the autocomplete feature? ...

ASP.NET Data Cache - Does Overwriting Imply Removal And Re-Addition?

If I add an item to the cache named "foo", and then add another item named "foo" to the cache before the first expires, will this trigger the CacheItemRemoved event? ...

Failed to load viewstate when dynamically loading different controls

I have an aspx page which is loading some controls dynamically on postback (ie when a click event happens) and adding them to a placeholder. Depending on what is clicked a different set of controls needs to be loaded. This works perfectly the first time, but when I clear the placeholder's controls and attempt to dynamically load a diffe...

Why does passing ClientID to a javascript function pass the whole control?

If I pass a ClientID to a javascript function as a parameter without including the single quotes around it, it gets passed as a reference to the control itself which can then be used without first calling getElementByID. I can't find this behaviour documented anywhere, is this a browser specific thing or a .net thing or what? I am sett...

PHP crypt() function in .Net?

I'm rewriting a PHP web site in ASP.NET MVC. I'd like to maintain the same user base but the passwords are hashed using the PHP crypt() function. I need the same function in .Net so that I can hash a password on login and check it against the hashed password in the user database. crypt in this case is using the CRYPT_MD5 implementation ...

Using custom performance counters across appdomain recyclyes

I have an ASP.NET application which tracks statistics by creating and writing to custom performance counters. Occasionally, I see in the error logs that indicate that the counters have failed to open because they had already been used in the current process. I presume this is due to my .NET appdomain having been reset within the same w...

ASP.NET: How to access the item being data bound during ItemDataBound?

i want to get at the item that is being data bound, during the ItemDataBound event of an asp:repeater. i tried the following (which was an unaccepted answer in a stackoverflow question): protected void myRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { Object dataItem = e.Item.DataItem; ... } but e.Item.DataIt...

Datatable's Compute Function For Rows

As we know that, with compute function of datatable we can get sum of columns. But I want to get sum of a row of datatable. How can I do it with asp.net 1.1? Edit: I will explain with a example: I have a datatable like image below: With compute function we can get the sum of each column (product). Such as for product1, 2 + 12 + 50 + ...

How to determine total size of ASP.Net cache?

I'm using the ASP.net cache in a web project, and I'm writing a "status" page for it which shows the items in the cache, and as many statistics about the cache as I can find. Is there any way that I can get the total size (in bytes) of the cached data? The size of each item would be even better. I want to display this on a web page, so I...

Advanced Search Form Validation in asp.net

I'm looking to make validation for a page in which one or more fields have a value in them. I have an advanced search form in asp.net and I'm trying to pop up an error and not post back if all the fields are empty. I've looked into required fields validators but I'm not sure how to make them work together in a AND type fashion instead ...

Response.Flush not working ASP.NET

I have an aspx page where i am Processing a large number of records from a table and doing some manipulation.after each manipuation,(each record),I have a Response.Write("Record : "+rec); Response.Flush() I have set Response.Buffer property to false. It is working fine But If i want to render the output as a table row,its not working a...

How to get which page threw an exception to Application_error in aspx

I have a general exception handler, Application_error in my global.asx what I'm trying to isolate all the uncaught exceptions on all my many pages. I don't want to use Page_error to catch exception because it's inefficient to call that on so many pages. So where in the exception can I find what page actually caused the exception. anythi...

ASP.net: Website or web application project

Is there any difference between website and web application project? What if you are working on a project that is sort of hybrid of site and application? which project should you chose? ...

How can I get the expiry datetime of an HttpRuntime.Cache object?

Is it possible to get the expiry datetime of an HttpRuntime.Cache object? If so, what would be the best approach? ...

Dynamic Data: Scaffolds are read-only for LINQ classes using Views instead of Tables?

I am trying to use the ASP.NET Dynamic Data features to generate CRUD scaffolding for my data model. My model contains supertype/subtype relationships, so some logical entities are split between two tables: one for the generic data and one for the subtype-specific data. In the LINQ context I expose these entities as a single class, back...

Forum software for asp.net C#

Closed as duplicate of http://stackoverflow.com/questions/342842/what-is-the-best-aspnet-open-source-forum I am looking for an asp.net forum software. Needs to be running on sql server 2005 or above. Also needs source code to go with that is written in C#. Would be awesome if it uses linq technology. Zeeshan Hirnai ...

Unmanaged DLLs fail to load on ASP.NET server

This question relates to an ASP.NET website, originally developed in VS 2005 and now in VS 2008. This website uses two unmanaged external DLLs which are not .NET and I do not have the source code to compile them and have to use them as is. This website runs fine from within Visual Studio, locating and accessing these external DLLs corr...

Learning website security (specifically on IIS7)

I have never had to deal with the security aspects of a website before but would like to learn how to run a secure website on my own server (IIS7). What elements of security do I need to learn? Are there good online resources? client side IIS Server / Firewall Asp.Net Note: I'm thinking of security meaning safe and secure, not relat...

Asp.net MVC Validating Dynamic Form

I'm building an ASP.NET MVC application with a form that needs validation. The majority of the form is static, but part of the form is dynamic. I need to enable the user to enter n string/date combinations. The string/date combos need to be validated server side, and I need to give feedback to the user preferably directly beside the ...

firing ASP.NET Events from javascript

I'm doing some straight up asynchronous calls from javascript using the XMLHTTPRequest object. On success, with certain return values, I would like to do an asynchonous post back on an update panel and run some server side methods. This is about how I'm implementing it now: <script language="javascript"> function AjaxCallback_Suc...