asp.net

Why does my WebPage Change When I put it on IIS

I write asp.net applications for a living. I look at the page through debug (localhost) and everything looks fine, but often once I put the files on IIS and view the page: things are different. Some controls are shifted, and widths are changed. EXACT same css and html. Is this an asp Server issue or IIS or what? ...

Generic Class & Type.GetType()

Hi All, Bit of a puzzler, I have a generic class public abstract class MyClass<T> : UserControl { } and I have got a type like this Type type = Type.GetType("Type From DB as String", true, true); and I want to create and instance of MyClass using the type... But this doesn't work. MyClass<type> control = (MyClass<type>)LoadCon...

Dataset Designer set default parameters

Hi guys, I have many typed datasets in my project. My purpose is to set two parameters of these datasets when I instantiate any of these datasets. (RemotingFormat and ExcludeSchema) Therefore I am looking for a solution like setting these two parameters in constructor of each dataset class. But this solution has two drawbacks: First, I...

Should a page with ViewState disabled still be validating a __viewstate field?

I have a shopping cart page (Cart.aspx) that has a button that will (sometimes) post to a third party payment gateway, if payment is necessary. The payment gateway will process the payment and then do a silent post to my website (Order.aspx) so I can update the order status. Order.aspx always throws an invalid viewstate error, even thou...

What is your experience with AxCMS

I am really considering AxCMS, N2, or umbraco for my next .NET project. I found AxCMS and could not find any valuable information on the CMS anywhere. Have you guys ever used this CMS before? If so, what was your experience and thoughts of it. ...

Ajax post doesn't work with html in parameters in combination with .net 4 framework

After upgrading our project to the .net 4.0 framework (from 3.5), we facing some problems with ajax calls with html in the parameters. As soon as the user enters some html in a text area the ajax call isn't executed anymore. If the user enters plain text only, there is no problem. <script language="javascript"> /* Doesn't work */ var...

How do I embed a flash object in my MVC2 Application Home?

I need to put a Flash Object in my website developed on MVC2 .NET, however the third party who made it just gave me an html with this code.HTML errors apart I don't know how to put it on ASP.NET. Can you help me? <table width="608" border="0" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4"> <tr> <td height="4...

Find ContentPlaceHolders in Master page

I'm looking for a way to dynamically load a master page in order to get a collection of ContentPlaceHolders within. I would prefer not to have to load a page object to assign the master page to before I can access it's controls, but if that's the only way I'll be happy to use it. This is the way I was hoping it would work: Pag...

Embedd third party js libraries on a custom control library. Yes or not?

I wonder what's the best approach for using third party js libraries on a control library. If the library uses (let's say) jquery and jquery-ui seems wrong to me to include those on the control library since, if the page using the controls already reference them, they will downloaded twice (the embedded version and the non-embedded vers...

ASP.NET A problem when connect from remote DB to localhost instance

Hi, I have made the remote database backup (MSSQL Server 2005 Express) to the localhost, and I want to connect with that in my app. To do so, I've changed the connection string: from Data Source=190.190.200.100;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword; to Data Source=TOMEK\SQLExpress;Database=myDataBase;Use...

How to Grant Permissions to Folder on Network , vs 2008 framework 3.5

I'm using Visual Studio 2008 on my local PC. My Code kept on network Drive. when i am trying to run it from my local machine i am getting below security exception.is there anyway i can Grant Permissions to network folder? *Security Exception Description: The application attempted to perform an operation not allowed by the security poli...

Paging for Listview inside a Gridview not working

I have a listview nested inside a gridview. I'm trying to get paging working on the listview. I thought that it would display the paging controls, and just page through them normally. It does display the controls, and limits the result set shown to the appropriate number of records (pageSize) but when I click on the paging controls th...

ASP.NET sessions over multiple domains

Is there a proper .NET solution for providing persistent server sessions over multiple domains? i.e. If a user of the site logs in under www.site1.com, they will also then be logged in under www.site2.com Security is an issue with the program we are working on... Thanks! ...

Asp.net Routing - Route constraints and empty Route

I have a url that I want to map routing to: http://siteurl.com/member/edit.aspx?tab=tabvalue where tabvalue is one of: "personal", "professional", "values" or nothing. I want to map it to a route like: Member/Edit/{tab} But my problem is - I don't know how to specify such constraints. I'm trying this regex: ^[personal|professiona...

HyperLink click problem

<li> <asp:HyperLink ID="hlLogin" runat="server" CssClass='<%# Css4Item(Eval("Page.Request.Path")) %>' Text="Prijava" NavigateUrl="~/Login.aspx"></asp:HyperLink> </li> protected string Css4Item(object url) { return url.ToString().EndsWith(Page.Request.Path, StringComparison.OrdinalIgnoreCase) ? "active" : string.Empty; ...

ASP.NET MVC app can't find Views since I moved my app to a new directory

I copied my app and put it somewhere else. Then I changed IIS to look at the new place and ran it. Debugging it - it runs through my Controllers in the new location fine. But when it nips off to get the view it goes to the old location of my app?!? ...

Web Service Debugger Exception : Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array'

I'm debugging a web service and only the first time I connect to it I get this exception on the DefaultWsdlHelpGenerator.aspx(?) class (take a look at the path) Now it seems to be related to compliance of the basic profile 1.1 but I have that turned off in the config file. <configuration> <system.web> <webServices> <confor...

Specific page security on web.config

I have the following on my web.config <location path = "WebPages/Reports"> <system.web> <authorization> <deny roles="DeniedRole1, DeniedRole2"/> <allow roles="AllowRole1,AllowRole2,AllowRole3"/> </authorization> </system.web> </location> <location path = "WebPages/Reports/SpecificPage.aspx...

How to dynamically add rows to a table in ASP.NET?

So today I started learning ASP.NET. Unfortunately I haven't found any good tutorials online, and I can't afford to buy books at the moment, so I've had to create a ASP.NET web application in Visual Studio 2010 and just play around with the default project setup. So far here's what I have in my Default.aspx: <%@ Page Language="C#" Auto...

Configure IHttpHandler in the Test Web Server

I am trying to implement an IHttpHandler. I have defined an appropriate class but the debug web server (you know, the one you get if you hit f5 in Visual Studio) is responding with "Can't Display Page". I looked here http://msdn.microsoft.com/en-us/library/ms228090%28v=VS.90%29.aspx to learn how to configure the handler, and it seems th...