View Complete Post
I am trying to use a custom ITempDataProvider provider to store TempData
in a browser's cookie instead of session state. However, everything
works fine except that I am unable to remove the cookie from the
Response stream after reading it. The code exexutes fine but the cookie won't go away.
public class CookieTempDataProvider : ITempDataProvider
internal const string TempDataCookieKey = "__ControllerTempData";
public CookieTempDataProvider(HttpContextBase httpContext)
if (httpContext == null)
throw new ArgumentNullException("httpContext");
_httpContext = httpContext;
public HttpContextBase HttpContext
protected virtual IDictionary<string, object> LoadTempData(ControllerContext controllerContext)
HttpCookie cookie = _httpContext.Request.Cookies[TempDataCookieKey];
if (cookie != null && !string.IsNullOrEmpty(cookie.Value))
IDictionary<string, object> deserializedTempData = DeserializeTempData(cookie.Val
I'm running VS2010 with .net 4.0, and am running into issues with the .net ajax script tags mysteriously not being rendered to the browser.
So far I've reduced it to a scenario where I set the DataSourceID property of a databound control. More specifically, I've only tested it on a Gridview and a DropDownList.
This can be reproduced fairly easily on my machine by following these steps:
1. Create a new empty Web Application Project
2. Create a new Web Form
3. Add a ScriptManager inside the form
4. Add a DropDownList and a DataSource (I used an ObjectDataSource)
5. Set the DataSourceID property of the DropDownList to the ID of the DataSource. This can be done either declaratively on the .aspx page, or in the code behind in the aspx.cs page, and both produce the same results.
Here's my source code showing my set up:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ScriptResourceFAIL.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 T
This is quite strange. here is the issue:
1. I'm using a multi-select jqgrid.
2. I have my own delete button to delete multiple orders
When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.
Here is the code:
Hi, whenever I load an aspx page in vwde2008, I get the message in the subject of this post. After I click Ok on that, I get a dialog box, Unable to Connect to the ASP.Net development center. What can I do to troubleshoot?
I am using Windows XP SP3, vwde2008 with SP1, on a HP desktop. Also using Office 2003 if that is relevant at all.
Hi all, we're testing our web app with a state manager so that we can do distributed rollouts. We're not getting any errors, but we are getting jibberish returned for every page request.
(it won't even let me paste it in here)
HOw do I get it to serve the pages normally?
Hi I have created an intranet application using ASP.Net/IIS.
I normally need to web share the folder and allow full permission to ASP.Net user account.
However, I carelessly deleted this account. How to create it again ?
Pls help.... thanks.
How can I test what my xsl spits out in the browser, rather than just viewing the xsl itself?
Here i'm creating two sites for internet version and mobile version.
When the user enters site name, we would detect the mobile browser automatically and redirect the user to mobile version of the site .
is it possible??
if yes, please tell the way i need to develop the application for mobile web application
Detect Browser Screen Size?? Hi Everyone, I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!
Hi Everyone, I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!
Hi i am planning to develop a site for mobiles. My first problem is how to find the mobile browser so that i can redirect to the mobile site for good look. When i searched for that i came accross WURFL which contains the list of mobile user agents? Is this the good solution or anybody having good solution please tell which will be helpful for me.
Waiting for the reply
I have an assignment to develop a mobile application for My company's customers (around 250000). its could be download from our website or we can also provide to our customers those are visiting our branches, on their demand.
1- this application should execute/compatible with all kind off mobile phone (Nokia, Samsun, LG, Motrola, Black Berry, iPhone..... every one). when it install on customer phone it will provide some certian option under the my company Icon to the user, like:
1- Help Line Numbers
2- Branches Address/Details
3- My Last Visit Informations.
4- My Next Appointment.
5- My Payment History and more etc etc......
the user will select any one option and then get the response by return text Message against the option he selected from our Site/Service (I dont konw what we will say this system who will response to the customers)
My Problem is that I saw/Check many fourms and articals they are giving the tips/det
hello, it's me again :-)
a (maybe) stupid question:
in asp.net 3.5 i've this .browser file:
<adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
now i suppose that in asp.net 4.0 this is not useful.
So what i've to do? I've simply to delete "App_Browsers" folder in my converted project or i've to put in this folder:
What's the best way?
Thank you very much!
Silverlight 2 applications are restricted to running inside a browser. However, Silverlight 3 applications can run inside the browser or out. Here we build a social networking app as a standalone Silverlight 3 application.
MSDN Magazine June 2009
This month Dino Esposito explains how the browser interoperability layer in Silverlight addresses a number of your Silverlight / Web page interaction needs.
MSDN Magazine November 2008
This month test your web site on many platforms and browsers without setting up a test environment, use mock objects for unit testing, and visit Raymond Chen.
MSDN Magazine June 2008