I am trying to render a user control into a string. The application is set up to enable user to use tokens and user controls are rendered where the tokens are found.
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter writer = new HtmlTextWriter(sw);
Control uc = LoadControl("~/includes/Homep...
Not sure if anyone listened to Hanselminutes episodes 134 and 135, but at the end of show 135 Scott Hanselman had a lot of great advice on how to setup a baseline secure environment for a web application. As a developer, most of my time is focused on developing the application, not on the network facet of the project, however as a start...
I am trying to debug a web application through IIS that has a virtual directory other than localhost. It compiles fine but gets the above message anytime that I try to start debugging. I have compilation debug="true".
...
For instance, I have a SqlDataSource that loads a list of items. On my form, I've got 3 dropdown boxes that both should contain that same list of values, and then the user can select a different value for each and save.
By hooking up each dropdown list to the same SqlDataSource, the database gets hit three times - one for each object t...
I have asked a similar question before, but I didn't have a firm grasp on what the problem I was encountering was. My problem is I cannot get the data from a TextBox residing on the master when the page changes. Here is what happens:
MasterPage with TextBox and Button.
Data is entered into the TextBox and Button is clicked.
Form's ac...
I think many developers know that uncomfortable feeling when users tell them that "The application is slow (again)."
In a complex web application there can be many possible reasons for a degradation in (perceived) performance: slow database response, bandwidth issues, bad caching etc. There certainly are issues which will never occur in...
I have seen bind and eval used interchangeably especially in ASP.NET GridViews. What is the difference?
...
I'm using http://urlrewriter.net/ to rewrite urls at my website. For example, I'm rewriting:
http://www.example.com/schedule.aspx?state=ca
to
http://www.example.com/california.aspx
What I'm trying to do (for SEO purposes) to to dynamically add the meta tag:
<meta name="robots" content="noindex,follow" />
only to the page t...
I have a web login page with the standard username password and login button controls. I would like to write a wrapper page that will render and auto fill the username and login form text boxes with a constant and force the onclick event for login button. Any suggestions how to accomplish this?
...
I have the requirement to call an internal method of a 3rd party object (I cannot make it public for example). I can do that via reflection. Unfortunately this does not work in ASP.NET Medium trust due to insufficient rights:
<IPermission class="ReflectionPermission" version="1" Flags="RestrictedMemberAccess"/></PermissionSet>
Is ther...
I'd like to externalize all of the strings used in the project into one file and be able to use it inside aspx, C# code behind and on the client side in JavaScript.
The reason I want to do it is because many strings are shared, i.e. the same in two places.
Is it possible? Is there a better way?
...
Hi
Thanks for going to answer my question. I have the folowing pages.
login.aspx
default.aspx
xxx.aspx
After logging into application default.aspx will be displayed. Now if the user is trying to open http://server/xxx.aspx?Id=1234 by specifying its URL directly in a browser, the login screen is displayed and after successfull login,...
It seems that the following piece of HTML is ignored in IE7 but works ok in IE6/FF. It supposes to override all the html links to be opened in the desired frame
<HEAD>
<title>LeftPane</title>
<base target="rightFrame">
</HEAD>
The above code is the header of a left frame that holds an Infragistics UltraWebTree (tree menu) wh...
I am developing a page view counter to track the amount of views a page is having on our site and displaying it to the user. (I asked an intro question before: http://stackoverflow.com/questions/246919/page-view-counter-like-on-stackoverflow).
Using the recommendations, I developed a httpHandler which will handle the request whenever th...
This is really two questions, first, do browsers normally cache images on the client by default or does the server have to indicate that they can be cached?
Second, given that I do not have access to IIS what can I do in an ASP application to improve client side caching of images.
...
I have a very standard Gridview, with Edit and Delete buttons auto-generated.
It is bound to a tableadapter which is linked to my "RelationshipTypes" table.
dbo.RelationshipTypes:
ID, Name, OriginConfigTypeID, DestinationConfigTypeID
I wish to use a label that will pull the name from the ConfigTypes table, using the "OriginConfigTypeID...
Hey all!
I got a problem at my blog. I got visits from kind bots who leave "nice" comments to my blog posts :(
I'm wondering if there is a smarter way to keep them out, besides using the captcha modules.
My problem with the captcha modules is that I thinks they are anoying to the user :(
I don't know if it's any help to anyone but m...
Hi,
Are there any replacements for NUnitAsp that anyone knows of for testing ASP.NET pages?
...
I'm a web developer who is still 'stuck' in the classic asp world. I want to step up to .net but I am unsure of which language to learn - most likely out of VB or C#. Are there any compelling arguments to choose one over the other?
...
Simple question. If you have a compiled and published ASP.NET web application running on a server and you need to update, say, a line in one of the codebehind files. Do you shut down the entire site, republish, then load the site back up? Or do you publish straight to your live site with users still using it?
...