asp.net

SharedAssemblyInfo.cs

I am using a SharedAssemblyInfo file which seems to be a 'standard' technique: http://blogs.msdn.com/jjameson/archive/2009/04/03/shared-assembly-info-in-visual-studio-projects.aspx I put the SharedAssemblyInfo.cs file into my web application because with web site projects I cannnot 'add files as a link'. But now I need to add a second ...

"__o" is not declared in Visual Studio 2008 doing ASP.NET

I have been getting this annoying error/bug in Visual Studio 2008 quite a bit when doing ASP.NET MVC. "__o" is not declared What is the problem, and how can I fix it? ...

Does DefaultAppPool run with special elevated privilegs on IIS?

I'm running a piece of code within a web page that queries the IIS metabase using ADSI. The code is as simple as this: DirectoryEntry iisNode = new DirectoryEntry("/LM/W3SVC/1/ROOT/MyAspWebsite-1-128886021498831845"); foreach (DirectoryEntry de in iisNode.Parent.Children) { System.Console.Wri...

How to get IIS version through .NET

I got web app which uses ms mvc. I'm still living in stone age - using IIS5. I'm not aware how to make URL`s clean in it (without .aspx postfix) and i do not care, cause production environment won't use 5th version. But it's irritating when testing app manually. I need a way how to make those URL`s clean or to get version of IIS inside ...

encrypting web.config in web farm

HI guys, I don't know whether this question has been asked earlier or not. But i want to encrypt the connectionstrings in my web.config. And my application will be deployed in web farm. I tried reading some blogs about this, but got confused. Can somebody tell me a link which they have really tried and got succeded. ...

Internet Explorer and client certificate in an IFRAME

I'm having a problem with a site that uses client side certificates for authentication. The site contains an iframe which loads a page hosted on a different server. This page also uses the client certificate. This works perfectly, except that a hiccup in the "inner page" webserver sometimes causes it to lose the authenticated state of t...

Turning off Request.Form validation on inherited button control

Is it possible to turn off the Request.Form validation on a per control basis? The problem is that IE 6 and IE 7 puts the content of the <button> tag into the name attribute, thus resulting in html code in the attribute which makes asp.net server shout out loud. Notice, this only happens in IE 6 and 7 because of their erroneous interpre...

What's the cleanest way to render the results of a method while data binding?

The best way, of course, is to convert the method to a property. But I can't do that here -- We have an API from someone else, and we've added an extension method to one of the objects. We need at the string this method returns in a data-binding situation (a GridView). It doesn't seem that we can add an extension property (man, that ...

HtmlForm.Action and .Net Framework 2.0/3.5 Query

Disappointingly, the members page for HtmlForm 2.0 is missing... My research seems to indicate that HtmlForm.Action is a property that was added in .Net Framework 3.5. However, I'm using VS2005 and my reference to System.Web (the namespace HtmlForm is under) is to a .Net Framework 2.0 runtime version. Further, my IIS status informatio...

Is there more I can do with ASP:AdRotator NavigateUrl than just a standard link?

I currently have a simple implementation of an AdRotator: <asp:AdRotator ID="EHR_Banner" target="_blank" AdvertisementFile="img/banners/ads/ehr.xml" Runat="server" CssClass="adRotator" OnAdCreated="AdCreated_Event" /> On the site that it resides I have a third-party 'pop-up' window script, GreyBox. I use it to disp...

jQuery Autocomplete with images :a small customization

Hi All, I am a newbie in jQuery. I am trying to use the auto complete jQuery pluggn in my ASP.NET page .I downloaded the sample from the site and trying to rewrite it from PHP to ASP.NET Can any one help me to rewrite it ? <script type="text/javascript"> $().ready(function() { function findValueCallback(event, data, formatted) { ...

Trouble creating new Entity Data Model

Hello, I'm trying to add a new ADO.Net Entity Data Model to an MVC project I am working on. When I complete the wizard, choosing my db and tables (just a single table for now) I get an error ""Exception has been thrown by the target of an invocation." and it throws me back the add new item dialog. At this point, an empty Data Model ha...

Issues rendering UserControl using Server.Execute() in an ASMX web service

Can anyone explain to why Server.Execute() is requiring my rendered UserControls to contain <form> tags (or alternately, what I am doing wrong that is making Server.Execute() require form tags in my UserControls)? I have created an ASMX service to dynamically load UserControls via JQuery+JSON as follows: ControlService.asmx <%@ WebSer...

get POST data in C#/ASP.NET

-Edit- Jon Skeet and darin togther answered my question 100% I am trying to get POST data but i have no luck whatsoever. By code is below, when i click the form button NOTHING happens. I expected at least my IDE to snap at A.Ret() but nothing happens whatsoever. Test.cs using System.Web; public class A { public static string ret()...

How can I trigger a server-side event from a client-side event?

Short version All I need is that, in a ModalPopUp, when the DoubleClick event of a ListItem fires, the click event of my OK button should be executed. Detail I have a ModalPopUpExtender, which hosts a user control. The user control has an OK and a Cancel button. Along with that, it has a dynamic ListBox added to it. So far, I've consi...

Turning off security for /

I am using openID on my site for login and need it to fetch the XRDS document So I unsecured it <location path="xrds.aspx"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location> But when the openID server checks the domain for the locati...

Is My ASP.NET Session Too Big?

In our .NET web app, we have a session object for each logged in user that is around 5-7 kilobytes. The session stores a Dictionary object that contains a couple of classes and the user's authentication token. Does this session size seem too big? I really don't know what a good size is or what good practices I should follow for sessions....

running vb.net application off a site

i designed a very simple vb.net application. i would like to my users to be able to access it through a website instead of locally. is this posible? how do i do it? does the webserver have to have special extensions? do i have to convert the program into a different format? ...

Asp.net pageBaseType error !!

Hi All, I write base class,MyBase.cs, for asp.net pages. I want all asp.net page inherit from that base class instead of System.Web.UI.Page. So i configure in web.config as mention below. <pages pageBaseType="MyBase"> Then i got following error message. Make sure that the class defined in this code file matches the 'inherits' attrib...

How can you access RouteData from the code-behind?

When using ASP.Net routing, how can you get the RouteData from the code-behind? I know you can get it from the GetHttpHander method of the RouteHandler (you get handed the RequestContext), but can you get this from the code-behind? Is there anything like... RequestContext.Current.RouteData.Values["whatever"]; ...that you can access ...