asp.net

nested master page with more than one nesting pages

I dont know if I have the right title for this question but here goes - I have this specification. i have 1 master page that has a top navigation bar linked to some aspx pages. These aspx pages have the masterpagefile as the main master page. Now i need 2 forms in the main master page that are part a and part b. So Part a = firstname, ad...

How do I test an ASP.NET MVC2 post action with validation when using MvcContrib TestHelper?

I'm attempting to write a unit tests for an ASP.NET MVC 2 post action that takes a view model as its sole parameter. The view model is decorated with validation attributes such as [Required]. I'd like to test two scenarios. The first scenario is when a valid set of data is passed in (ie, all required properties have values) and a redirec...

ASP.NET AJAX UpdatePanel - cancelling postback in InitializeRequest will not set back to re-enabled.

Within an ASP.NET AJAX UpdatePanel on my page I have a submit button which has some custom javascript validation applied which set a global _cancelGeneralSettingsUpdate flag depending on the results of the validation. Everything works unless you enter an invalid value, correct it, and resubmit. In this case the variable _cancelGeneralS...

GridView: Columns.Insert() cause my data to vanish on postback, but Columns.Add() works OK?

I have a GridView that has several dynamic columns (I do not know how many at design time and it could be 0-12 columns, hence need for dynamic columns). I have the columns in the grid and data bound to them - works great. There are other standard, design-time TemplateField columns with TextBox controls in them. These are bound with va...

Can ASP.NET validation controls display an exclamation point with tooltip message?

Can the standard ASP.NET Visual Studio validation controls display an icon with a tool tip message instead of text, the way the WinForms ErrorProvider controls work? If not, is the AjaxToolkit's ValidatorCallout control the best approach? Is this control flakey? ...

How to post status updates on myspace using asp.net C# ?

Can someone please tell how can I post status updates on myspace using asp.net C# ? Thanks :D ...

Why would ASP.Net incorrectly write a path to a CSS file when output caching?

We have an ASP.Net site using Themes. So, ASP.Net is placing our the LINK tags automatically to embed the CSS files. Everything works fine...until we start output caching. When we output cache a page, every once in a while, the path to one of the CSS files in App_Themes gets screwed up. Without output caching, we get a path like this...

Delete cache when web browser is close.

Hi all. I have issue about multiple login in asp.net. Case this happen: User X login as "user1" in web browser. Then user Y also login as "user1" also in another web browser. User Y got error message "Another user log in some account". That is work as expected. If X, close their web browser. Then try again to login in as "user1". X get ...

RDLC file generating PDF and send via email

I'm generating PDF files from RDLC report programaticaly without a viewer (ASP.NET 2.0 C#). I would like to find a way to send it directly via email without downloading the PDF file. Thanks for any help. ...

Inconsistent behavior when saving a PNG to Response.OutputStream

This question is related this one: http://stackoverflow.com/questions/582766/cannot-render-image-to-httpcontext-response-outputstream. It is not a duplicate. When attempting to save a PNG to the Response.OutputStream I am experiencing inconsistent behavior between the local development environment and the production environment. Namely,...

How to display size and icon for pdf and word docs?

Hi, I have webpages that contain links to word documents and pdf files. For each link I want to display the file size and an icon showing what the file type is. I'm thinking the best way to do this would be with CSS? Can anybody give me an example of how to do this? Thanks! ...

ASP.NET Web Form on SharePoint

Heh guys, I would like to create and deploy an ASP.NET web form on SharePoint server which can create document in SharePoint list (or library). Since I'm not experienced in both these technologies so would appreciate if someone guides me to the right tool. Should I use Visual Studio or SharePoint designer ? Also, I was reading an articl...

Mixed authentication in ASP.NET application

I've got an ASP.NET application which uses forms authentication. We're adding on an HttpModule that responds to requests in the /webdav folder and below. We need to use basic/digest authentication for these requests. With <authentication> set to Forms in the root web.config, requests from webdav clients are receiving a 302 redirecting...

Calling ScriptManager.RegisterPostBackControl during an AsyncPostBack

I have a custom control which is a wrapper around the ASPxGridView. This custom control is nested inside an UpdatePanel. In one of its columns I add a LinkButton, which I register by calling ScriptManager.RegisterPostBackControl. The grid has paging enabled. Paging is of course done during an AsyncPostBack. When the grid is showing its...

In C#, how do you check if a path is virtual or not?

Possible virtual paths: /folder1/folder2/image.jpg ~/folder1/folder2/image.jpg folder1/folder2/image.jpg Concrete path: C:\folder1\folder2\image.jpg D:\folder1\folder2\image.jpg C:/folder1/folder2/image.jpg C:/folder1\folder2/image.jpg How do you check whether a path is virtual or not in a way that's not prone to failure? The reaso...

IIS and WebDev server problem

developing web application i faced a problem. i wrote code, and it worked fine on webdev server in vs2010. i hosted it on remote iis, because, my windows 7 home basic doesnt have iis, and almost all code fails, so i had to rewrite it with using helpers for links, ResolveUrl and many other functions. So here is the question, how can i hos...

Generate static web pages from a template as part of ASP.NET Web application build

I'm building an HTML5 application (with ASP.NET back-end) and i want to develop it in such a way that i can run it locally with all my resources (such js and css) not minified (so i can debug it easily). However when i build the final version i want merge and minify the resources. At the same time i want to create several versions of the...

Different Javascript and CSS for Release build VS2010

I would like to have my release build use the minified version of css/javascript 'A' and the debug build use my uncompressed version of css/javascript 'A' is there any way I can do that on and ASP.Net page? Essentially I am lazy and don't want to have to change references everytime I do a publish. Thanks in advance. ...

I am setting a cookie's expiration time 10 mins which is working fine in local system but on server, it's not working.

Hi all, I am setting a cookie's expiration time 10 mins which is working fine in local system but on server, it's not working. Please help me it's urgent. Vinay ...

Best way to show the SQL trace of a LINQ query to Entity Framework 3.5

Best way to show the SQL trace of a LINQ query to Entity Framework 3.5? I am using ASP.net and EF 3.5. Dim dbo As Web.Portal.RBMEntities = New Web.Portal.RBMEntities Dim Query = From RoleAllocations In dbo.RoleAllocations Where RoleAllocations.user_id = _ID And RoleAllocations.expire_date > Today Select RoleAllocations ' Console writ...