asp.net

Are ASP.NET Web Site projects inherently slow at compiling, or could I have deeper issues?

Hi, I've been working on a legacy ASP.NET Web Site (versus a Web Application) project at a client for some time now, and its slow compile time has me wondering: Are web site projects known to be slow(er) at compiling (than Web Application projects)? It's a pretty small website, but the entire solution has tons of functionality -- 19 p...

Getting information (on click) that was used to programatically generate asp controls

How may one get information that was used to programatically generate asp controls? For example, I pulled a DataTable of user objects from the database and have organized them on a page, listing groupings such as a list of employees directly under the employer for each employer. On the page, I list each user's Username as a LinkButton....

stop header displaying on asp.net repeater

How do i stop the header template of a repeater from displaying when there are no items in the datasource <asp:Repeater ID="TabsRepeater" runat="server" DataSource='<%#Eval("OrderedChildNodes") %>'> <HeaderTemplate> <ul class="child"> </HeaderTemplate> <Item...

Parsing Multiple values and sending it in a query string

I have a grid view with multiple select check boxes. I want to return an array of the items that have been selected and put this in a label (comma-separated) 12,34,34,54,54,5 I want it to be parsed and then sent to a query string or send the whole value to the query string. How do a get multiple selected check boxes and return an ar...

ASP.net parsing Diffgrams in XML to use in DataList

I have a method: public static DataSet getTable() { DataSet DS = new DataSet("My Set"); DS.ReadXml(getCategories()); return DS; } My getCategories() returns a stream containing my XML. But when I run this, I get this error: The supplied xml instance is a schema or contains an inline schema. This class cannot infer a schem...

Enyim memcached provider CPU spike

I've implemented a caching interface and memchanged provider for our website using enyim. Works great in testing until we get to load testing, where it spikes the CPU of w3wp.exe to near 100%. We have a configuration property to switch the caching provider back to dotnet's API and the CPU goes back to 5-7%. Has anyone experienced simi...

Which technology stack would result in easiest deployment for a customer-hosted web app?

For a web-app product which would need to be installed by the customer on their own servers (think FogBugz or the self-hosted Wordpress package), which technology stack would result in a smoother/easier installation? Our target platforms are known: Windows/IIS/SQLSever and Linux/Apache/MySQL. But the technology stack to be used is bein...

Is it possible crawl ASP.NET pages?

Is there a way to crawl some ASP.NET pages that uses doPostBack as events calling? Example: Page1.aspx: Contains 1 LinkButton that redirects to Page2.aspx Code-behind for LinkButton Click event: Response.Redirect("Page2.aspx") In client side this code is generated on click event: doPostBack(... Is it possible crawl pages usin...

How to make a specific field wider within the gridview?

<asp:BoundField DataField="ComputerModel" HeaderText="ComputerModel" SortExpression="ComputerModel" ItemStyle-Width="50px"/> <asp:CheckBoxField DataField="Lease" HeaderText="Lease" SortExpression="Lease" /> <asp:BoundField DataField="SerialNumber" ...

System.Threading.Thread.Sleep - Any legit reason to have in production code?

I'm doing some code cleanup, and I came across a few instances of System.Threading.Thread.Sleep(2000); These are all in Button Click events. I can't think of any reason why this would be in production code? Am I missing something? EDIT -- Full Code Block (some things changed, but steps are the same) -- And yes, I think it sucks t...

Bind LINQ data via stored procedure to Gridview

The function in dbml is, [Function(Name = "dbo.sp_GetQuestions")] public ISingleResult<vw_QuestionMaster> sp_GetQuestions([Parameter(Name = "Sort", DbType = "Int")] System.Nullable<int> sort, [Parameter(Name = "Title", DbType = "VarChar(50)")] string title, [Parameter(Name = "Tags", DbType = "VarChar(50)")] string tags, [Paramet...

Posttorial: ASP.NET MVC, Entity Framework and LINQ video tutorials - Including MIX09, PDC, TechED

EDIT: During this post I started searching on video tutorials on ASP.NET MVC, EF and LINQ and found some very useful links which I shared here. As I believe videos are more interactive and easier to learn from. Hope, they'll help. Guys, please share the resources to get start on MVC, Entity Framework and LINQ. And if you...

Problem with Literals and ViewState

I am trying here to create a module linked to a webhosting cart process. The first step should have a textfield with an "add" button. This button checks the availability of a domain and add it to a list. The goal here is to basically display the list of domain verified and give proper action as radioboxes (register if it is free, trans...

ASP.NET Membership & GridViews

I have a site using ASP.NET Membership and have a number of roles that users are assigned to. One feature I really want to do is to be able to programatically add the "edit" or "delete" buttons to rows in a GridView, based on the role the user is a member of. For example: If the user is an admin I want to show the edit and delete butto...

MS Access Error: The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

Hi all, [Update: The query works if I hardcode in the parameters - so it has to do with the way I am adding parameters to the query] For the life of me, I cannot figure out what the problem is here. Here is the query being passed to the datareader: SELECT * FROM (SELECT TOP ? StartDate, [ID] FROM (SELECT TOP ? StartDate, [ID]...

User permission error when accessing "user instance" database from ASP.NET

The server hosting csharpindepth.com has recently been migrated. Most of it is working fine, but I can't get at the database used to hold errata, notes etc. Relevant details: 32 bit Windows Server 2003 SQL Server Express 2005 installed ASP.NET pool running under "NETWORK SERVICE" account .NET 3.5 Everyone has full permission to datab...

.Net 1.1: asp.net photo gallery

Hi all. I don't know if you guys remember back in .Net 1.1 there is a ASP.net photo gallery web application on www.asp.net site. Does anyone know what happen to the project? Is it dead? Where can i find the source code? Thank. p.s. I don't remember what the project was called. It was out at the same time the ASP.net personal website ...

VS 2008 Opens Default Browser instead of IE for SilverLight Application

Hi My default browser is Chrome. When I run my web applications within VS 2008 IDE, it uses chrome. I want to use IE for this. Is there an option in VS 2008 to make IE the browser to load the web applications? I just want this when using VS 2008 - I don't want to change my default browser each time otherwise. EDIT: when creating a s...

Serializing Array of Objects to JSON in WCF to Comply with OpenSearch

I'm trying to write an OpenSearch Suggestion service that complies with the OpenSearch spec. http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions This spec requires the service to return a JSON array with the first element being a string and the following elements being arrays of strings. I'm able to get it almo...

Open source component to develop multi-page PDFs from HTML

Does anyone know of an open source solution for generating multi-page PDFs from HTML server-side? iTextSharp etc. are all about composing page-by-page. Please don't suggest a PDF Printer. I know of store-bought solutions that achieve this very well, but there has got to be a free component. Regards. ...