asp.net

How did dotnetkicks.com implement their ASP.NET paging?

I know the dotnetkicks.com system is open source so I can view the code myself but I can't make sense of how they did their paging. It's hard to explain but if you goto dotnetkicks.com you can play with the paging on their front page. What I am specifically interested in is how they show the first few pages, then "..." and then the last...

In .net, is there an opposite function to Server.HTMLEncode() ?

.Net's Server.HTMLEncode() is the very helpful function that takes an HTML string and replaces special characters with their entity equivalents - "<" becomes &lt ; and so forth. Is there a (built-in) function that does the reverse? There doesn't seem to be, and I am incredulous. While I could certainly write my own (and have in the pa...

exception logging help

I work on a rather large web site. We currently have 4 web servers and an active passive db cluster running asp.net 2.0 with C#. Currently our exception handling is not trapping the correct exception being thrown. I have heard it is because server.getlasterror() is not thread safe (note: we currently do not use server.getlasterror().getb...

sync cookies and sessions in different subdomains (asp.net)

I am building a site in asp.net and have multiple subdomains. For example, one.cookies.com two.cookies.com I want my users to be able to login at either subdomain and be logged in for both websites. In addition, I'd like the sessions and cookies to be in sync. So far I haven't found a reliable way to do this. ...

.Net Master Page Perfomance

I'm looking for some help on my discussion. We're discussing two solutions to a customization problem. One uses (nested) master-pages. One master page per customized page. Plus there is a standard master page for all pages. The second uses a standard page, which redirects to the custom page if it exists. My question is, which is m...

Is it possible to host an ASPX web site on Linux?

We are trying to convert a lot of things at work over to Linux Red hat. Recently Windows Server 2003 was installed. We are currently hosting an asp .net web site on the windows server machine, what I'm wondering is if there is any software that will allow you to host the same web site on linux? ...

How do I pull the clientID of an asp:button inside an asp:listview for use with jQuery?

I'm attempting to do something which should be relatively simple. I'm using a ListView to show a number of items, using the ItemTemplate. Inside the ItemTemplate I have a div surrounding the full item, so that I can highlight on a hover event, (being handled already by jQuery). What I would like to do is have the click event on the di...

How can I set up different build configurations for ASP.Net web site projects?

According to an earlier question about Visual Studio configurations, there's no way to use Visual Studio's configuration manager to create different configurations for an ASP.net web site project. For normal projects, we have #if directives that switch certain server or database variables depending on whether we're debugging or in pro...

Prevent a user from closing a browser window using "X"?

Can I tell, using javascript, whether a user has clicked on the "X" icon on a browser dialog, or the "OK"/"Cancel" buttons? I have code I need to run when the window closes, but it will only run when OK or Cancel are clicked. I currently capture the onunload event of the window. How can i accomplish this? window.onunload = function() {...

Can you use the asp.net membership provider in a windows application?

The Asp.Net membership provider has some clear uses in a web app. I am thinking about trying to leverage some of the features in a windows application (more specifically WPF). Does anyone know if it is possible to use the core features in a windows app? I am mostly just looking for it to create my database tables, and maintain users, ...

How to prevent Sql-Injection on User-Generated Sql Queries

I have a project (private, ASP.net website, password protected with https) where one of the requirements is that the user be able to enter Sql queries that will directly query the database. I need to be able to allow these queries, while preventing them from doing damage to the database itself, and from accessing or updating data that th...

How do I count checked checkboxes across all pages of a gridview using jquery?

I want to instantly update a status line indicating the number of checked checkboxes across all pages of an asp.net gridview. Right now I am only ably to count the number of checkboxes that are checked on the current gridview page. Here is my code. $(document).ready(initAll); function initAll(){ countChecked(); $(".activeBoxe...

Display problem with Update Panel in ASP.NET

I'll try to explain my problem the best I can, here goes: I have an update panel on an ASP.NET page and a Panel server control inside it. I have an rounded corners extender attached to the Panel server control and the extender has a solid background with a solid border. ok....I haven't found an easy easy to position the update panel i...

asp.net web application compile and deployed on x64 vs x86

My web application crashes almost once a week due to not enought memory error. Although server has 8gb of memory and it's server 2003 x64. And almost 5gb is always free. I compile my application with Any CPU option in studio 2008. My laptop that i use to build this has 32 bit vista. Is my web application running under x86 or x64? if ...

Dynamically add multiple instances of the same user control type when button is clicked

Is it possible to add instances of the same user control when an "add" button is clicked and maintain ViewState? The user interface here is similar to the Gmail file-attachment process, where the user can click "attach another file" and another file upload box appears. My page is surrounded by an UpdatePanel. I am able to get 1 control...

How: MSI for multiple websites WITHOUT custom actions

I would like to create an installer that installs 6 websites, all of which rely on a data access library. So the solution contains 6 web applications, and 1 class library. Question is: how can I accomplish this without using custom actions? So far, the only thing i've thought of is to make merge modules out of the web app projects, ea...

Page_Load called in Firefox, but not IE

Hi, I've been thrown into an ASP.NET project and I've got a page which contains a control that is fetched via AJAX. The Page_Load function of the control does a little bit of logic necessary to get the correct values from the Query string. The problem is that the Page_Load function isn't called in IE. If I put a breakpoint in, I can ...

Custom dynamically created Menus producing some strange errors...

The background is I have a custom control that is a asp:Menu that is linked to an xmldatasource. The xmldatasource is created dynamically depending on the user privies. Here is the load event for the custom control: protected void Page_Load(object sender, EventArgs e) { string userId = (string)Session["userId"]; ...

Import and Export Excel - What is the best library?

In one of our ASP.NET applications in C#, we take a certain data collection (SubSonic collection) and export it to Excel. We also want to import Excel files in a specific format. I'm looking for a library I can use for this purpose. Requirements: - Excel 2007 files (Does Excel 2003 support over 64k rows? I need more than that.) - Does ...

Can cookies be copied between machines to impersonate a user?

We have an application that among other things, checks the existence of a cookie and reads and decrypts the contents of the cookie. Though the data stored inside the cookie is not sensitive, it has been encrypted via TripleDes encryption. A question was raised today whether the cookie saved on a single PC, could be copied on to another P...