asp.net

asp:Button inside asp:hyperlink does not navigate to page in internet explorer

I have an asp:button which is inside an asp:hyperlink. When you click the button in firefox, it goes to the correct url specified by the asp:hyperlink, but if you click the button in internet explorer, it stays on the same page. I am just using the PostBackUrl property on the button to resolve the issue, but here is an example of the c...

What are the best perfmon counters for an ASP.net application?

What are the best performance monitors one can set to monitor an asp.net application? I don't have direct access to the server in question, so I sort of have to explicitly ask for certain things other wise they do not happen. My hunch is that my app pool is restarting, but I want to get to the bottom as to why this is occurring. ...

Left Outer Join and Exists in Linq To SQL C# .NET 3.5

I'm stuck on translating a left outer join from LINQToSQL that returns unique parent rows. I have 2 tables (Project, Project_Notes, and it's a 1-many relationship linked by Project_ID). I am doing a keyword search on multiple columns on the 2 table and I only want to return the unique projects if a column in Project_Notes contains a key...

Public Methods inside User control c# .net

How can invoke user control's public method from within the page? I load the control dynamically inside OnInit on the page.Any ideas? For some reason I am getting a build error that says that the method doesn't exist, even though it's public. Starting to think that user controls are not worth all the hassle. ...

How do you change the background color of a row based on a value when databinding to a GridView?

When databinding to an ASP .NET GridView, how does one change the background color, based on a boolean value that is a column in the data table that the GridView is bound? For instance if you are bound to a table that has two columns: Name, LikesBurritos. And you want to have the labels of people's names be Blue if they like burritos a...

Object not garbage collected, but contains no gcroots

Running into a prickly problem with our web app here. (Asp.net 2.0 Win server 2008) Our memory usage for the website, grows and grows even though I would expect it to remain at a fairly static level. (We have a small amount of data that gets stored in state). Wanting to find out what the problem is, I've run a System.GC.Collect(); a fe...

How can I customize the FreeTextBox menu?

I want to customize the menu of my FreeTextBox (FTB) control on an ASPX page. How do I add/remove elements from it? I'd also like to enable its spell checking feature. Any help/references will be appreciated. Thanks! ...

Programmatically refresh/update HttpContext.User

I'm using FormsAuthentication for an ASP.NET site that has a master page that displays the current logged in user, Page.User.Identity.Name. They can change their username in their settings, and when the do so, I update their cookie for them so they wont have to sign out/sign back in with a postback. FormsAuthentication.SignOut(); Forms...

How to implement role based security using Dynamic Data and Active Directory?

What is the best way to implement security using active directory roles on an asp.net dynamic data site? I would like to restrict certain views (and the related links) to certain roles. i.e. user A can only view list actions for table x and user B can only view list actions for table y ...

How to bind the selected value of a DropDownList

Data binding is all about declarative code, right? So I specify what I want with attributes, and the framework takes care of the rest. Unless I'm mistaken and data binding relates to S&M, right? So, why does the DropDownList control only provide binding fields for its data source, i.e. its list source, and not for its actual data fiel...

HttpWebRequest not returning, connection closing

I have a web application that is polling a web service on another server. The server is located on the same network, and is referenced by an internal IP, running on port 8080. Every 15 secs, a request is sent out, which receives an xml response with job information. 95% of the time, this works well, however at random times, the reques...

web page appears scattered when loading?

When loading a page for the first time, the images do not show for a second (like they are invisible). The structure of the page becomes appears to be scattered. If you hit refresh, it is fine. Are there fixes that can resolve this? ...

Converting/accessing QueryString values in ASP.NET

I'm curious what everyone does for handling/abstracting the QueryString in ASP.NET. In some of our web apps I see a lot of this all over the site: int val = 0; if(Request.QueryString["someKey"] != null) { val = Convert.ToInt32(Request.QueryString["someKey"]); } What are some better ways to handle this grossness? ...

How do you sell the idea of ASP.net over OSS?

How many of you tried to sell ASP.net to client or boss but go up against the wall of free OSS stacks(PHP, RoR...etc.)? Nothing wrong with OSS or ASP.net. I'm interesting in how to overcome selling ASP.net solution against OSS. ...

Is there a way to put inner controls inside a ASP.NET Custom Control?

I want to do something like (Updated example): <uc:Tabs> <Tab Name="A handy tab"> <Node Url="~/Default.aspx" /> <Node Url="~/Node2.aspx" /> </Tab> <Tab Name="Another handy tab"> <Node Url="~/Neato.aspx" /> <Node Url="~/Node3.aspx" /> <Node Url="~/Node4.aspx" /> </Tab> <uc:Tabs> Possible? Any tutorial...

Windows Authentication prompts for username/password

I am trying to deploy an application in a client network, with AD/domain controller. My application is a simple asp.net c# application, using windows authentication. I am using win2003. Basically, using VS2008, create a new website, hosted on IIS6.0. Only 2 changes. 1. On IIS Directory security for the application, enabled "Integrated...

YUI MenuBar positioned behind a ASP.NET Silverlight Control

Using the YUI Menubar, when the items drop down they appear behind a ASP.NET Silverlight Control. I am not using YUI layout. I've already tried setting the z-index:99 and the position:relative for in menubar css, as well as setting the div's z-index:-1 and position:relative. Any ideas? ...

Detect Changes webform controls asp.net

Hi all, I have a webform with around 20 textboxes/drop down list controls and i would like a clean and simple way of checking to see if the form fields have changed or not. Does anyone know of a clean way to do this? Thanks in advance! ...

ASP.NET webpages without names ? ala stackoverflow?

Mentioned stackoverflow only as an example, but if you look above the URL for ask is http://stackoverflow.com/questions/ask which means /ask is a subdirectory, but they also do this for the specific question pages. How do you code this in .NET? Not a code question as much as a technique. I know this is great for SEO, but how do yo...

Getting 'Data source is an invalid type' when binding Linq query to Gridview

Hi all - I'm trying to bind a gridview to a linq to sql query that's using a stored procedure. When I run the page, i get the following error: Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource. var db = new TableItemDataContext(); var q = db.sp_SearchForItems("1","2","3","4"); GridView1.D...