asp.net-2.0

How to use a MasterPage on a MobilePage

Although MSDN says the MobilePage.MasterPageFile property prevents master pages from being used, I've seen people talking about using master pages on their mobile pages. Can someone show me an example of a MasterPage being used in a MobilePage? If it really is not possible, I'd like to know what the people on the asp.net forum were tal...

ASP.NET application in virtual folder uses web.config of application in root folder of website

Hello, I have several ASP.NET applications in virtual folders (already configured as applications, and with different application pools), but I want to install another ASP.NET application that will redirect to one of the virtual folders according to some criteria (from database and cookies). All the applications in the virtual folders ...

How to stop SelectIndexChanged for GridView

I have a grid view, and in the grid view i put a Check Box in the Item Template. When every time I tick the check box, it will fire the the grid view selectIndexChanged event hadler. Any idea How I can stop it fire the selectindexchanged? I have try put autopostback to false for the check box but it not work. Please help......... ...

How do I do conditional logic within an ASP.NET DataRepeater control?

I'm binding my DataRepeater control to a table that has many columns. I'd like to only display a subset of those, depending on what is populated. How/where should I do my contitional tests within a dataRepeater? This is the code within my itemtemplate: <% if (0= (DataBinder.Eval(Container.DataItem, "first").ToString().Length)) { ...

Can not get the session moniker for the task <guid>

Hi all, .NET 2.0 web app, running on a virtual server. I'm getting the following error message in Event Viewer: Can not get the session moniker for the task 4572092d-622d-4a20-9b96-691371021d49. (The guid sometimes changes, but are quite constant). This app was recently migrated to a virtual server from a physical server, and the err...

ASP.NET Threading - can I do Async methods or do I use threading?

My environment - C# 3.5 and ASP.NET 4.0 and VS 2010 Apologies - am a bit new to some of the concepts related to threading and Async methods. My scenario is this: My site will periodically make a couple of GET/POSTS to an external site and collect some data This data will be cached in a central cache The periodic action will happen on...

How to GroupBy 2 values in a Generic list, VB.NET ?

I'm using VB.NET on Framework 2.0. I'm looking to quickly group a Generic List<> by two properties. For the sake of this example lets say I have a List of an Order type with properties of CustomerId, ProductId, and ProductCount. How would I get the average of ProductCounts grouped by CustomerId and ProductId in VB.NET ? Unfortunatly I c...

ASP.NET: How do I open an external website page whose login credentials I have?

Platform: ASP.NET 4.0, VS 2010 My scenario is this I have the credentials of an external website I do a couple of GET/POST to scrape some data off of it Depending on something that I find, I want to give my user a hyperlink that, when clicked, takes him 3 levels deep into the target website beyond the login page Of course, I could j...

C#.Net ASP.Net Data Controls

Could any body explain what does this contain: ds.Tables[0].Rows[0][0] Thanks. ...

Redirect *.domain.com & domain.com to www.domain.com

I've got an Search Engine Optimisation problem where users are able to access my site by specifying any sub-domain. This is causing duplicate page issues with SEO. For example if a user mis-types 'www' then posts a link on a forum, google is crawling 'wwww.domain.com'. Furthermore, google is also crawling 'domain.com'. I need a way of ...

Can't connect to server in SQL Server 2005

I am using Sql Server 2005. When the connect to dialog box opens, it asks me for the server name. I entered "localhost", but I am not able to connect to the server. An error message is displayed. How can I connect to server and where can I find the server name? ...

Client date and server date confusion.

I am working on a website in ASP.NET where emails can be scheduled for feauture. But the problem is with the date difference between server and client. As the server is in India an USA user can schedule a date behind today's date as their time zone is different. But this email will not be sent ever as the date has already been passed her...

adding pages in live asp.net site dynamically without redeploying or recompiling ?

Is there some way to add .aspx pages in live asp.net site without need to recompile or redeploy ? Please guide me. thanks ...

dynamically change body id in masterpage in asp.net 2.0

Greetings, I'm pretty new to the asp.net platform, and am having trouble doing the simplest of things. As my title suggests, I'm wanting to dynamically change the body id on my master page in order to change the background and formatting of the page depending on what section of the website you're on. I have an idea on how to implemen...

System.Security.Policy.PolicyException: More than one exclusive group is not allowed

Hi, I have a site hosted on Netfirms which is throwing this exception and I got told by their support to make sure my site is running on medium trust. Thing is.. when I try to set the trust level on the web.config, I get a different exception which says I cannot override the this setting (so I'm assuming it's defined on their end). I'm...

ASP.Net -- <select> items not being posted back after jQuery populates list

I have an ASP.Net ListBox that I'm trying to populate via jQuery, using the following snippet: $("#MyList_btnAddAll").click(function(e) { e.preventDefault(); $('#MyList_lstAll option').appendTo('#MyList_lstSelected'); }); The code has two ListBoxes in fact, one a "source" and the other a "destination". As you can tell abo...

Looking at Membership class with reflector

I was just going through user registration process in asp.net (System.Web.Security.Membership class) with reflector and spotted that some code was commented out public static bool ValidateUser(string username, string password) { return Provider.ValidateUser(username, password); /* if (retVal) { PerfCounters.Increm...

metrics in ASP.NET application

I need to add some metrics and statistics capabilities in ASP.NET application (Framework 2.0, SQL Server 2005). It's Intranet application, so I can't use Google Analytics. I need not only measure number of hits and visits, but also which buttons people are pressing and which functions of application are using. Will it be enough to use ...

ASP.Net State Server Fault Tolerance

Can a State server in ASP.Net be made fault tolerant? By that I mean is when one state server goes down, ASP.Net applications can switch to another state server. I do not want to go to a Database based state management as that seems considerably slower than the State Server. ...

How to preserve ampersand in URL's querystring when using RegisterClientScriptInclude?

I have the need to add a javascript include to my ASP.NET page. The url of the javascript file has two key/value pairs in the query string. But the ampersand is being escaped and I don't want that. Page.ClientScript.RegisterClientScriptInclude("myKey", "https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;s=1") This r...