asp.net

asp.net gridview sort without data rebind

I am trying to make a gridview sortable which uses a stored procedure as a datasource, I would not want it to rerun the query each time to achieve this. How would I get it to work my current code is: protected override void OnPreRender(EventArgs e) { if (!IsPostBack) { SqlCommand cmd2 = new SqlCommand("SR_Student_Course_List...

Cheap ASP.NET Hosting - Mutiple Domains

Can anybody recommend some quality ASP.NET hosting providers that allow you to multiple domains without making you use a "reseller" account or purchase multiple accounts. I really only need email accounts for one of the domains. I'm looking for something about $20 to $45 USD. ...

Determine which button inside a user control sent the event

I have a user control that has several buttons. On page_load, I want to run a method except if a specific button was pressed. When I check the sender on page load inside the user control, I just get the name of the user control and not the button itself. Is there a way that I can determine what button was pressed on page_load? Otherw...

Storing shopping cart in session

I know the general consensus for information like shopping cart items is to store them in session. But what about objects that belong to a user that can be altered by other users? Say, for instance, an eBay-like site. If you store a user's "items" in session, which contain the current bid amount, and another user comes in and places a...

asp.net remove unused httpmodules

I am looking at the performance suggestions lots of pages have about asp.net. Specifically the remove unused httpmodules part: <httpModules> <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/> <add name="Session" type="System.Web.SessionState.SessionStateModule"/> <add name="WindowsAuthentication" type="Syste...

How can I use Digest Authorisation with my ASP.NET site?

Hi folks, i wish to require a popup window for users to type, to access my website. For the username, password .. i was hoping to have a few hardcoded names/passwords in some file. I was told that Digest Authorisation could be used, to do this. If i've got a stock standard ASP.NET website, where can i define the username's / password? ...

Any way to build Google Docs like viewer for PDF files?

Does anyone think it is possible to build a Google Docs style PDF document viewer, which will convert a document to a format that doesn't require Adobe Reader on the client machine? If so, any references to point to? Either a place that had done it, or an explanation of how to do it. ...

Does jQuery's $.ajax() function handle ASP.NET authentication correctly?

I have a web app protected by ASP.NET Forms Authentication. The site uses jQuery's $.ajax() functionality to call a web service in the same app. Browsing to the web service .asmx does cause forms authentication to kick in and I once authenticated and make a $.ajax() call to the server I also see the ASP.NET session cookie and forms aut...

Problem mixing webforms into ASP.NET MVC application

I've been toying with the idea of taking an existing ASP.NET Webforms application and converting it to a hybrid so that going forward, we can do ASP.NET MVC. In order to do this, I created an ASP.NET MVC application and started copying some of the folders from the ASP.NET webforms projects that contain webforms. I'm having a problem bu...

Creating a WebService C# ASP.Net

The Code Snippet is as follwos namespace RecruiterWebService { /// <summary> /// Summary description for Service1 /// </summary> [WebService(Namespace = "http://tempuri.org/") ] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class **Service1** : System.Web.Services...

Custom Control

Hi I have a custom control which i need to use in another custom control. I have written all code at server side (no HTML). can anyone tell me how to write below line of code in code behind using htmlTextWriter and how to register this control or how to write custom control within another where html is written from code behind. ...

How to add a TableRow/TableCell to an ASP.NET table from Javascript?

What is the best way to dynamically add TableRows and TableCells to an ASP.NET table from Javascript? Thanks, Jeff ...

Getting to the query string (GET request array) inside a web service in .NET

I'm looking to find a way to access the .net query string contained in the standard ASP.NET request object inside a web service. In other words if I set a SOAP web service to this url: http://localhost/service.asmx?id=2 Can I access the ID Get variable? ...

Limiting records returned by a sqldatasource, using session variable in where clause

Hi, I have a web application which has a Sql Server database on the backend. As the site will be rolled out to different clients (or different virtual directories in IIS), each client derivative of the site will use the same backend. There is an admin page where text on the site can be changed (enter text in a listview, and choose the ...

How can I remove unused CSS classes from my website project?

My project has collected CSS entropy (unused classes) during its course of development. Now in order to keep the CSS file small, I want to remove all unused CSS references. But doing that manually involves searching for each class in the entire project. That takes time. Do you know of any way/tool which I can adopt to find out which CS...

.net image button click not working in internet explorer but working fine in mozilla

Hi, I have written c# code for ascx. I am trying to send an email on the click of image button. Please see the code below. Here is the codebehind function which is called on submit button click. <%@ Control Language="C#" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Web.UI.WebControls" %> <%@ Import Namespace="Syste...

What are the key factors that ensure successful ASP.NET application scalability?

When starting a new ASP.NET application, with the knowledge that at some point in the future it must scale, what are the most important design decisions that will allow future scalability without wholsesale refactoring? ...

Exception Handling in classes and Code Behind with C#

Hi... I'm a little bit stuck with a asp.net project that i'm doing! I have got a class that is called from the code behind and many of its function have no return type ie, being void. How does one do exception handling then??? Also, if the function within the class does have a return type of, for instance, a dataset how would one then r...

How to publish Asp.Net WebService with debug information?

Starting with asp.net 2.0 the debug=true in the compilation section of the web.config file is deciding if the website/webservice will be compiled with debug information or not. But the compilation output is a lot of "gibberish" under the ASP.Net Temporary files. Only wiht publish i can get a clean output to be properly hosted under the W...

ASP.NET Treeview control supporting drag & drop?

Can anybody recommend a treeview component for ASP.NET that supports drag & drop (between it's own nodes - it's for a content management system to rearrage the pages). Don't mind if it's open source or commercial (can't quite stretch to the treeview from Telerik though). Shame.. Any other options? Thanks. ...