asp.net

Alternatives to .Net Membership

Are there any alternatives\mods to .net Membership? I find it quite restrictive; Cant change Username, easily. You have to create a new user and copy the fields, but then you lose the primary key OR you have to edit the user table directly yourself. Additional profile fields are stored together as one blob. ...

Server-side equivalent of HttpContext?

I have a web app that currently uses the current HttpContext to store a LINQ Data Context. The context is persisted for the current request, on a per user basis, per Rick Strahl's blog: string ocKey = "ocm_" + HttpContext.Current.GetHashCode().ToString("x") Thread.CurrentContext.ContextID.ToString(); if (!HttpContext.Current.Items.C...

How to include a partial view inside a webform

Some site I'm programming is using both ASP.NET MVC and WebForms. I have a partial view and I want to include this inside a webform. The partial view has some code that has to be processed in the server, so using Response.WriteFile don't work. It should work with javascript disabled. How can I do this? ...

Type or namespace not found for user control.

Tonight I copied an ASP 2.0 web site onto a client's machine, and lo! It did not work. It works perfectly on mine, under built in debugger and under IIS 7, and two weeks ago, it worked perfectly on his machine under IIS 6. The only changes I have made are upgrading telerik RadGrid etc. to Q1 2009, and some refactoring. The applicatio...

Page Redirect in SharePoint

How would I be able to redirect someone to a specific page based on their user profile information such as the department they are in? I came up with 2 options: Have a "My Department" link to a aspx page that uses SharePoint's object model to determine what department they are and then redirect based on their department. Have an HTTPM...

GridView ButtonField postback not working in IE7?

I have an ASP.Net Web Site with GridView control that in turn contains a ButtonField column. It's supposed to do a postback when this ButtonField is clicked, but that doesn't happen if I click on the button from within the Internet Explorer window that Visual Studio opens while debugging. I can get it to successfully postback when I brin...

Special Error Page in Asp.Net

Hi, i want to redirect to a special page which shows detailed error message for unexpected errors.Which solution is the best for it in asp.net?Can u give examples? Thanks ...

HTML divs popup to select columns

Hi, I have a web application(ASP.NET2.0 C#) and in it, I have a gridview that gets its data from a datasource. I wanted to add the following feature: the user can click a button "select columns", and a box pops up with a list of all the columns(a checkboxlist in a div, possibly) and that way, the user can choose the columns they want to...

On a deployed ASP.NET web site project, can I update a .resx file without recompiling?

I'm deploying an ASP.NET application to a locked down Production environment. Pushing assemblies (satellite resource assemblies included) into this environment has process associated with it, but copying non-assemblies to the environment does not. On an ASP.NET web site project, can I update a .resx file without recompiling? ...

Asp.Net select in Sql

This is going to be very simple I know. I have seen so many different ways of using sql in asp.net with no real standard. What I want to know is how to cleanly select from an sql database in asp.net and retrieve multiple records. For example: select all userids. String sql = "SELECT [UserId] FROM [UserProfiles] WHERE NOT [UserId] = '...

NullReferenceException on Page_Load

I'm trying to edit a textbox's text in a Page_Load form on an ASP.NET page, but when I try to edit TextBox1.Text it throws a NullReferenceException because the TextBox has not yet been instantiated. Specifically what I'm trying to implement is this: http://www.codeproject.com/KB/user-controls/popupcalendarcontrol.aspx but it is written f...

How can I tell IIS to compile specific folders independently of the rest of my Web site?

Is there any way to get ASP.Net to compile different folders independently? I have a Web app that uses some commercial software. The admin UI for this software is in a single folder -- there are about a 1,000 files in there, all told. (I've looked through it -- it ain't the greatest code ever written...) This folder takes forever to ...

How can I have my page access functions from a .vb file in App_Code?

I made a new page in our website that needs to access some functions that are in App_Code/modFunctions.vb. I tried simply calling the functions but it says not found in current context. So here are the file locations, starting at the root of the site: /App_Code/ModFunctions.vb /users/export.aspx export.aspx is my C# page that I need t...

Is there any better web browser control in C# (.NET)?

I need JavaScript working almost perfectly in my application that should be able to access web content and let user take a control of it. However, webbrowser component pops new windows in separate instance / application of Internet Explorer and dotBrowser doesn't work with JavaScript properly. Please, give me some advice - I'd even take...

Debugging .Net OracleClient error

We currently use iBatis and nHibernate on the same website. Performing a save on a specific page causes the following error to be thrown: System.Data.OracleClient.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction Stack trace is displayed at the end of this question. This only happens on this one page (a...

how to bind asp.net controls using a self join and items tables "hierarchically structure"?

I have the following tables: 1-Categories: -CategoryID -CategoryName -ParentID 2-Items: -ItemId -ItemName -CategoryID categories can be in a hierarchically view, with many children categories inside each other. And any the last child category can have items, so just the last category child will show items under it. The view will be lik...

Web based Image editing and annotation controls for ASP.NET

I am for a control that we can buy to crop and annotate images from an ASP.NET web site. The customer wants to be able to crop, change contrast, etc. AND add shapes (lines, squares, circles, text, etc.) The image quality doesn't need to be all that high. The images are used for "evidence" and are annotated to explain what is going o...

Inversion of control for your Inversion of control container?

I've recently had to update a relatively large control library that uses Ninject 1.0 to Ninject 2.0 to help resolve some issues I had with 1.0. The update has gone well and I think Ninject 2.0 is a lot quicker. However to try and avoid this problem in the future I have created my own interface for injecting fields and properties (which ...

ASP.Net error

Am getting this error in my asp.net page: A potentially dangerous Request.Form value was detected from the client (ctl00$DefaultContent$UCSimpleSearch$txtFind="$%^&#%^&@#%@"). I get this error when i type $%^&#%^&@#%@ in a textbox of this page and hit submit. How do i overcome this error? Is it recommended to set validateRequest=fals...

Is it safe to believe Page_Unload will always run and is a good place for Dispose() code?

I'm familiar with the try{}finally{} pattern, the using(){} pattern as ways to ensure Dispose() gets called, but for an ASP.NET page, is it just as safe to Dispose of objects created in page scope on the Page_Unload event? Would it make sense to override the Page's Dispose() method instead? I'm not sure what code raises the Page_Unload...