asp.net

Is it safe to set ValidateRequest=false when using Linq to SQL?

I'm using ONLY Linq to SQL for database access, so I assume it is safe to turn off request validation... ...

Why does Response.Redirect close my browser window instead of redirecting?

For whatever reason when I use Response.Redirect the window just closes out instead of navigating to the given URL, here is the code. if (mode == "print") { error_code.Text = ""; //thumb.Src = file_loc + "source/" + "certificate_thumbnail.jpeg"; link.HRef = "Certificates/" + u_name + ".pdf"; link....

Run STSADM from ASP.NET under _layouts

Is it possible to run STSADM from an ASP.NET application that is residing in the _layouts folder? I have copied this code on this page. When it runs the return message is Access Denied. ...

How can I minimize the weight of my ASP.NET pages?

Hi everyone and thanks in advance for helping. I rely heavily on nested Master Pages in my web portal, this causes ASP.NET to generate huge ID tags for controls it creates, for example: "ctl00_ctl00_MainBody_ctl00_lblDescription" for a lblDescription Label i've created. Is there any way to reduce this clutter? Any other techniques(so...

Good or bad practice, using regular html in view

Being comfortable with using html, I find it easier to just use regular html in my views, for example, creating a textbox with <input type="text" maxlength="30" name="firstname"> instead of <%= html.textbox("firstname") %>. Or <form method="post" name="myform"> instead of <% html.beginform() { %>. Is this considered bad practise ? Shoul...

Caching and Session state management using Microsoft Velocity and Memcached

I was looking at Microsoft Velocity and memcached to find a solution for some session management issues - What is the difference between caching that is provided by Microsoft Velocity, memcached and session state management? I mean memcached and microsoft veolocity provide distributed caching capabilities... so using these to store sess...

ASP Required permissions cannot be acquired.

Hi, I'm developing an ASP.NET WebSite and I get an Exception Required permissions cannot be acquired. ... Is there a way to find out which permission(s) are missing? Kind regards christian I know the assembly that causes the exception, but I don't know which permission it requires. ...

Can I use the ASP.NET 'OutputCache' control to cache images without a performance hit?

I have some ASP.NET MVC actions that generate images dynamically (although it could equally be an ASPX page). I'm using [OutputCache] to cache these images. I'm just wondering if I need to worry about ASP.NET caching images in memory and taking up too many resources. These are product images of varying sizes for a shopping cart contain...

Replicate IIS setup from one machine to another

Looked for an answer to this and didn't see it. This is for IIS 6.0 / Windows Server 2003. I'm working with an extremely large ASP/ASP.NET application and I'm trying to get my development environment to match my team members environment. This process is basically trial and error: get an error, go into IIS, make a change, hope the err...

Set Focus to a textbox after data validation in .ASP page

I am working on an asp page that verifies information in a text box after the user types it in. A “product number” is manually entered (free form). Using the after update event, I have the page post the data and lookup the product number to determine if it is valid. If not valid an error message is posted in the box, otherwise the produ...

Create HTML table out of object array in Javascript

I am calling a web Method from javascript. The web method returns an array of customers from the northwind database. The example I am working from is here: Calling Web Services with ASP.NET AJAX I dont know how to write this javascript method: CreateCustomersTable This would create the html table to display the data being returned. Any...

Does anybody create installers to deploy internal asp.net web applications?

I've always deployed my web applications via FTP (sometimes even xcopy), and then manually run database scripts myself. I started deploying this way in the 90's, but lately, I've seen a few web apps with installers. I'm starting to question, if I'm locked into an out dated process. I'm a consultant, my apps are usually internal, so ...

import csv file/excel into sql database asp.net

Hi everyone! I am starting a project with asp.net visual studio 2008 / SQL 2000 (2005 in future) using c#. The tricky part for me is that the existing DB schema changes often and the import files columns will all have to me matched up with the existing db schema since they may not be one to one match on column names. (There is a lookup ...

Using HtmlTextWriter to Render Server Controls?

I'm writing the RenderContents() method of my ASP.NET server control. The method uses an HtmlTextWriter object to render the output content. For the control I'm writing, using the HtmlTextWriter's methods seems like it will require a lot of lines of code to open and close every tag and add every attribute to the stream. In the end I feel...

Invisible controls still being rendered

I'm having the weirdest problem. I have two PlaceHolders in a Master Page; one contains controls for users who are logged-out, and the other for users who are logged-in. They are: plhLoggedOut plhLoggedIn During my Page_Load (of the Master Page), I set their visibility like so: //LOGGED-IN? plhLoggedOut.Visible = (a...

Microsoft speech API 5.1, 5.3 ?

Hi, I'm a little confuse between the different SAPI version available. First of all, I only find the SDK to develop with the 5.1 version, is there any SDK for the 5.3 version available, if not, why ? Witch version can I use if I'm developing with the 3.5 version of the .Net framework. Is there any good tutorial because the only one I...

id and name attributes of HTML elements manipulated by ASP.NET

I have a problem in my C# ASP.NET application, where the id and name tags are modified at runtime with a prefix "MainView_" and "MainView$" respectively. So my code: <asp:Button ID="OKToContinueCheckInButton" runat="server" CausesValidation="False" Visibility="false" Style="display: none" OnClick="btnOKToContinueCheckIn" /> <script ty...

Hot to get the status of a Windows service in ASP / .net ?

I need to find a way to monitor the status of a list of Windows services over HTTP, preferably without any third party program). All I really need to be able to do is display the service name and its status ('Started' / 'Stopped'). I'm not an ASP programmer so this is a little outside my realm. I've searched and haven't been able to f...

ObjectDataSource caching on large static result set

Hi, I have an objectdatasource that will return a potentially large collection (up to 200,000 records) that are bound and paged in a gridview. I am using default paging and caching on the objectdatasource. The data being returned is only updated weekly so stale data is not an issue. The paging in this solution was also faster than w...

jQuery Validation plugin and ASP.NET validators Web Forms

I would really like use the jQuery Validation plugin in my ASP.NET Web Forms application (not MVC). I value jQuery validation for the Richer UI experience I can provide the end user and I have some requirements to highlight the invalid fields using a red border (css). I value asp.net validators because they run the validations not onl...