asp.net

ASP.NET: How can I access a remote UNC path in IIS 6 on XP?

There are quite a few solutions here that discuss accessing a UNC path from IIS, however I need to get this to work under XP. How does one get ASP.NET (on XP) to access a remote UNC path? Where do I set the credentials? I've attempted the SU4User Impersonation extensions, setting the IIS anonymous account, etc, and think there is more...

Class encapsulation with Repository Pattern

I am sortof using a repository pattern to extract information from a database. I have two classes, report and reportRepository. The trouble I have is that since reportReposity has to fill in all the details for the report object, all the members in the report have to be publicly accessible. Is there a way so that I can ensure that onl...

With the ASP.NET GridView control, how can I disable controls or individual cells in a GridViewRow after PageIndexChanged?

I have a data bound GridView control, in which I am able to disable individual cells based on the User role. This only works on the first page. private void LimitAccessToGridFields() { if (User.IsInRole("Processing")) return; foreach (GridViewRow gridViewRow in gvScrubbed.Rows) { var checkBox = (...

How can I make my asp.net page postback when a control is clicked inside a jQuery dialog?

I'm having some trouble with jQuery UI. I've created a dialog with jQuery UI: so far, so good. I set up a form inside the jQuery UI dialog and then it's another story. I've written a very simple page to illustrate: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testpage.aspx.cs" Inherits="RiverCascade.testpage" %> <hea...

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

Hi Excepts, I want to manage two web.config file in a application one for the front-end user and second for the back-end(admin) user.for admin section I have created a folder with name admin in the same website.following settiongs are in the admin/web.config ...

Resizing Div In IE 6

The following is a version of some code I'm having trouble running in IE version 6. It seems to work fine in IE 7, IE 8, FireFox, and Google Chrome. But in IE 6, when I expand and collapse nodes in the treeview, the SurroundingWrapper div resizes, but the message at the bottom stays glued in place (I'd prefer it stayed glued to the bot...

Jumping to content location of a different page with ASP

Does anyone know how to jump to the content location from a href link on another page in ASP? I understand the anchor concept shown below, but this only works with html not ASP. <a href="yoursite.html#jumpHere">link</a> ...

ASP.NET Session Load Performance

Hi Everyone, I need to calculate some performance numbers for a few custom session storage providers. I need to know how long it takes to rehydrate session and how long it takes to persist it back to the store. None of the providers provide this level of detail in the debug information. Is there a generic way of tracking session load ...

What's the base class of a Razor View in ASP.NET MVC3

I'm trying to have all my views inherit from a custom class so that I can add certain behaviour and values to all pages, but I'm having some issues. I tried subclassing System.Web.Mvc.WebViewPage but I'm forced to implement an Execute procedure that I don't know what it should do. Also, if I try to access the Context variable, I get a nu...

Membership Role Provider doesn't work with custom connection string?

Hi all, plz help with one issue. I have Membership configured with IIS7, tables for it located in my own database, created with aspnet_regsql utility, and I am using custom connection string to access it. This is part of web.config related to Membership : <connectionStrings> <add connectionString="Server=CORESERVER\SQLExpress;Data...

ViewState["sample"] Variable not retaining value on postback in a composite control

Hi, I have created a composite control with sample details as follows. Basically, the first time on page load the control sets a view state variable and the problem is that on post back (when the button is clicked), the ViewState variable is null. I have researched extensively and I am not able to find a solution. I checked all the Mic...

Dataview filtering according to start date?

HI, I have a dataview that contains all the events. I am just sorting it in DESC order according to the event start date. Now my question is I need to get two event items from first start dates.Let say i have 4 event items starting on 10/17/2010 and 5 event items starting on 10/18/2010. Now I am suppose to get in this way 1. event it...

DropDownListFor population problem

I have the following 2 classes: public class SomeClass { public int SomeClassID { get; set; } ... } public class AnotherClass { public int AnotherClassID { get; set; } public int AnotherClassText { get; set; } } I have a ViewModel that contains the following: public class MyViewModel { public SomeClass { get; set; } publ...

Instruction for deploying asp.net app on Windows Server 2008 R2

Is there a complete instruction for deploying an asp.net application on windows server 2008 r2? I've got to send some instructions to admins who are not experienced with using Win/IIS, but I'm not willing to write it myself, because I'm not good with server administration too. I've googled the topic for a number of times, but didn't find...

All the data annotations (or attributes) availabe in Asp.net M-V-C

Is there any way to look at all the data annotations or attributes available in Asp.net MVC? i.e. for validation we have "Required", "StringLength" etc, for Action verbs, "HttpPost", "HttpGet" etc, similarly "Bind", "MetadataType" etc. I am kind of new to Asp.net MVC and MVC is loaded with attributes for different purposes and I don't k...

ASP.NET Response.TransmitFile Failing on First Download

Hey guys, I have some code on an aspx page then when users loads the page it starts downloading a zip. Looks like this: Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileSaveName); Response.TransmitFile(zipPath); ...

Best Free available wysiwyg html editor

Hi Guys, I want to use one free wysiwyg html editor in one of the website I am developing. It's commercial website which I am developing for a company. Could you please suggest me from your experience the best free available wysiwyg HTML editor for web. FYI - Website is build with ASP.Net 4.0, C#.Net Thanks, Happy Coder ...

Custom Data Validation Annotations - ASP.NET MVC2 C#

I have a viewmodel that partially looks like this... [Required] public int Year { get; set; } [Required] [Range(1, 5000000)] public int ModelID { get; set; } [Required] public int ZipCode{ get; set;} I want to add a custom validator attribute that checks a database to make sure...

Umbraco vs Sitefinity

hello, I am getting a large website developed. The develop has asked me which do I prefer either sitefinity or umbraco. The site will be similar to wikipedia where users can come and edit pages without having to login. I would like to ask your opionions on these two csm systems and which one would you recommend for content website with a...

Force AutoCompleteExtender dropdown to redisplay via Javascript

I have an AjaxControlToolkit.AutoCompleteExtender control attached to a textbox, and three radio buttons. When the user selects a radio button, the service method used to retrieve the values listed in the AutoCompleteExtender is changed, as follows: $("#radioButtonList input").click(function() { var selectedValue = $(this).val(); ...