asp.net

Why IIS7 treat a specific XHTML page as XML page?

When I try to access a page, I got an error like below, but I can view the full source code, the source code has no problem, I have no idea why IIS7 tells my browser the XHTML page is an XML? (It's not my browser's problem, cuz I asked my friends to test and he got the same result) XML Parsing Error: not well-formed Location: htt...

Authorization Issue - anonymous users can't access .jpeg or .css

Hi. I have this on my web.config file: <authentication mode="Forms"> <forms loginUrl="login.aspx" defaultUrl="Venues.aspx" /> </authentication> <authorization> <deny users="?" /> <allow users="*" /> </authorization> I only whant to alow authenticated users to my pages. The problem is the first time that I go ...

Dynamically rendering controls, determine type from string/XML File?

In an ASP.NET application, I'd like to dynamically render several controls with their properties coming in from an XML document. Here's the kicker: I want to be able to dynamically determine the type of control. So, in my XML document, I have something like this: <control> <id>myControl1</id> <type>CheckBox</type> <text>...

UpdatePanel Full Postback

Greetings, here is the scenario. I have and .aspx page with and updatepanel like this <asp:UpdatePanel id="uPanelMain" runat="server"> <ContentTemplate> <uc:Calendar id="ucCalendar" runat="server" Visible="true" /> <uc:Scoring id="ucScoring" runat="server" Visible="false" /> </ContentTemplate> The control ucCa...

How can I make my RadioButtonList show up stacked vertically?

I have a RadioButtonList on my .aspx page and I load it in the codebehind. How can I have it show vertically? ...

Charting and Data Manipulation.

Hi, Although there are some threads on here about .net charting controls, I'm starting new thread becuase I'm possibly looking for some advanced data manipulation (maybe this would fall under datamining but I'm not sure) along with charting. I've been asked to research and prototype and Key Performance Indicators (KPI) system. Basically...

Setting active tab in ASP.NET Ajax TabContainer causes entire container to disappear

I have an ASP.NET page that uses the ASP.NET Ajax Control Toolkit TabContainer. In the Page_Load event, I am hiding some of the tabs based on the data given to the page. I then want to make one of the tabs active based on the value of an (optional) query string parameter. So I have: protected void Page_Load ( object sender, EventArgs e...

How can I display text beside each radiobutton when loading a radiobutton list from an enumeration?

I am loading a radiobutton list from an enumeration (vertically displayed). I need to show text that describes each radiobutton selection. I am loading it in the codebehind. ...

Elegant way to make CustomValidator work with ValidationSummary messagebox

I have run into this problem before but never quite solved it. I have a form with several validators and also a CustomValidator. <asp:Label ID="lblMemberNum" runat="server" Text="Membership #:" CssClass="LabelMedium" ></asp:Label> <asp:TextBox ID="txtMemberNum" runat="server" CssClass="TextBox" ></asp:TextBox> <asp:RequiredFieldValidat...

ASP.NET app access to UNC shared DB file works as IIS virtual directory but not as an IIS website.

This one is killing me. I have an ASP.net (2.0 Framework) app that uses integrated security. IIS is setup appropriately and works fine as a virtual directory off the default website. My OLEDB connection (Jet 4.0) works fine and connects to a database file via network share (\GIS1\GIS Server - PublicWorks_StreetSigns). BUT, when I create...

Membership switch from ID to email

Currently I have a site (asp.net 3.5) that uses a unique ID for the login. I am going to need to switch it to use emails if possible. I am going to be creating all new accounts so I can wipe the membership table clean and import all the user info. We are switching from generic logins for departments to individual accounts. Any link...

AS3 retrieving xml from aspx page

Hello all I'm an AS3 noob on training wheels... I have an XML Loader class which is doing what it's supposed to with a test.xml file, however I need the flash to read the xml written by an aspx file. So I tried: var urlRequest:URLRequest = new URLRequest("../xml/CaseStudyFlashAssets.aspx"); I get error #1090 (which I gather is bec...

What would happen if a DataSet was returned duplicate named columns from SQL?

I am creating as stored procedure that brings back a bunch of data that I need from multiple tables, however the tables share some duplicate column names. It works fine in SQL but I am wondering what will happen and how I will differentiate between them once I am accessing them as DataRows from a DataSet. Anyone know? ...

Reading XML In Flash From An ASPX Page

Hi guys, I have created an aspx page which dynamicaly creates an xml string and posts it back to the client. protected void Page_Load(object sender, EventArgs e) { Response.Clear(); Response.ContentType = "text/xml"; Response.ContentEncoding = Encoding.UTF8; var flashAssets = Asset.GetScro...

How do I log unhandled exceptions in ASP.NET MVC?

Here's what I'm trying to do in my Global.asax.vb: Public Class MvcApplication Inherits System.Web.HttpApplication Shared Sub RegisterRoutes(ByVal routes As RouteCollection) routes.IgnoreRoute("{resource}.axd/{*pathInfo}") routes.MapRoute( _ "Error", _ "error.html", _ New With...

Encrypting contents of a file when uploading

Hi, Am using asp.net's FileUpload control to upload a word file to the server. I want to encrypt the contents of this file (using our custom encryption API) and then save it in the server. How do i achieve this?what should be my approach? Thanks. ...

How can I enumerate a radiobuttonlist in .NET?

How can I enumerate a radiobuttonlist in .NET? ...

Fastest way to use reflection for converting datareader to list

I am using reflection to convert datareader into the generic collection list. Can anybody suggest me the best way to implement reflection for this? I want the fastestway? ...

Which .NET Object Relational Mapper is fastest?

I want to use an Object Relational Mapper (ORM) tool for my ASP.NET application. I have three options: NHibernate, LINQ to SQL, and Subsonic. Which one is fastest? ...

How to convert this PHP script into C# ?

I got the following code from this question: http://stackoverflow.com/questions/539920/what-is-the-best-way-to-clean-a-string-for-placement-in-a-url-like-the-question $str = strtolower( preg_replace( array('/[^a-z0-9\- ]/i', '/[ \-]+/'), array('', '-'), $urlPart ) ); This code works for me with PHP, its making clean and SEO'd ur...