asp.net

Good ASP.NET excel-like Grid control?

We are looking for an ASP.NET compatible data grid that allows for multi-line editing similar to Excel or a WinForms data grid. It must also support very basic keyboard input (tab, arrow keys, return). Note that we are not looking for Excel capabilities (functions, formatting, formulas) ... just a grid for fast data entry. I've looked...

What are some ASP.NET GridView performance improvement opportunities?

I have an ASP.NET application that is fairly basic. It queries some data and displays the data in a GridView (0 - 2000 or so records possible). I've been trying to find some ways to make it zippier, best practices, etc. as it seems to be a little sluggish while the GridView is being rendered. I've seen some threads on utilizing CSS vs...

SQL: Select TOP N Marks Per User (In a List of Users)

I am having difficulty writing a Stored Procedure that will query a list of students with their associative marks. Retrieving a List of Students - trivial Retrieving the top five marks per student - trivial...SELECT TOP (5) * WHERE StudentID = X Combining these two, I am a bit confused. I would like the Stored Procedure to return two ...

Using ajax to call a web service when Windows Authentication turned on?

Hi I am trying to call a web service method from javascript: function Search() { var context = new Object; context.Filter = "Test"; SearchService.GetSearch(context, onSuccess, onFailed); } function onSuccess(result) { // userContext contains symbol passed into method var res = document...

What would you say to someone who wants to make everything a .NET control?

For example, we have some CSS rules to define our form layout. We use the following markup: <div class="foo"> <label class="bar req">Name<em>*</em></label> <span> <asp:TextBox runat="server"/> <label>First</label> </span> <span> <asp:TextBox runat="server"/> <label>Last</label> </sp...

How to detect if an aspx page was called from Server.Execute?

I have the following example page structure: Webpage.aspx Script.aspx If I call Server.Execute("Script.aspx") from Webpage.aspx, how can I detect in Script.aspx that it was called from Webpage.aspx and not directly from a web browser? I've tried checking the Referrer but this only seems to return domain and not the script. I'm usin...

The optimal way to check if a query string is an int?

A question that came to one of my colleagues mind, what is the best way to check if a query string is an int. I suggested using the classic Int.Parse and try and catch, also TryParse was suggested. Actually i can't think of any other ways. Any ideas? ...

Asp.net Self Hosted WCF Service WSDL with relative paths

I am working on a WCF application that will be deployed to various servers along the way and I would like to not have to remember to change the app.config every time I do a deployment. At first, my app.config serviceModel section looked like this: <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" /> ...

Can I proxy a select field with HTML and javascript?

Since <select> elements don't style in a predictable way, I was thinking about setting up a javascript/html proxy element to manipulate a hidden <asp:dropdownlist> field. The code that populates the select is beyond my control, but I don't want to render the actual field. Does anyone have any experience or pointers with something like t...

ASP.NET UserControl Inheritence

I have a UserControl that is working fine. It is declared like this. public partial class DynamicList : System.Web.UI.UserControl { protected static BaseListController m_GenericListController = null; public DynamicList() { m_GenericListController = new GenericListController(this); } } Now I...

DotNetNuke module development with webservices

I need to deploy a webservice as part of a DotNetNuke 4.x module that I'm creating - but am not sure how I can do that and know that it'll always stay in the same place. How can I add an asmx file to my module project, and when I create my .DNN file specify where the webservice will end up? I want to reference the webservice from insid...

How to Use 'Like' with a parameter

I want to search for a number embedded in a string in a field in our log table using a parameter. select * from vwLogs where log_time >'02/24/2009' and message like ('%2009022508241446%') I know how to use parameters when the where clause is an equals sign but not sure how to do it with 'Like' this doesn't seem right WHERE message l...

Clean way of using polymorphism at the presentation layer - ASP.NET

A lot of times, I find myself doing UI control manipulation in the code behind and wanted to find a clean way of doing this. Use Case: A drop down has CSS1 style, editable in Edit mode but has CSS2 style, view only in View mode I can achieve this by simply have a set of switch case statements. I can use polymorphism and cr...

ASP.NET master pages order of adding scripts

I have a master page that adds the jquery library via a registerclientscriptinclude: Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "JQuery", Page.ResolveUrl("~/Scripts/jquery-1.2.6.min.js")); In a page that uses that master page I want to include a script that depends on jquery: Page.ClientScript.RegisterCli...

Custom ASP.NET control inherited from the GridView control is not rendering style(s) (e.g. AlternatingRowStyle.BackColor)

I'm having a bit of an unusual problem with an extended version of the ASP.NET GridView control that I am working. It is rendering all of the text applied to it just fine, but is not rendering any the style properties that are set. For example, if I set the AlternatingRowStyle to use a gray background, the gray background is not being re...

ASP.NET, Visual Studio, C# and Javascript

I have a simple ASPX page based of a master page. On the ASPX page, I have two drop downs and a button. When pressing the button, I want to execute some javascript. To do this, I have used the Button's attribute collection (Add("onclick", script)). My script looks like this: string script = "return confirm ('You have selected' + docume...

A ghost deleted my files?

I have a pretty weird situation here, and i came up with a very strange conclusion, the thing that makes me think that i got it all wrong, that i have cured the scratch with hcl or something ! Anyways, two days ago i found out that all the pages in a certain directory on a web app that I work on stopped working; When I tried to debug...

unit testing user login/logout

I am very new to the whole unit testing concept so I'm sorry if "unit test" is the wrong word for this. I think it might actually be a "integration test"? At any rate, I am using asp.net's membership framework for login, logout, change password, etc. But I do a few extra things like updating the authentication ticket, adding an entry to...

Is there a JAWS-friendly date picker for ASP.NET?

Does anyone know of an ASP.NET date picker control that works well with JAWS? Barring that, do you have any tips for making the existing ASP.NET date picker control easier to use for JAWS users? ...

How do you specify what file in a directory will load up asp.net

Rudimentary folder structure: <root> ---<admin> ------index.aspx ------[other files] ---index.aspx When I navigate to mywebsite.com/admin/, all I get is a directory listing. How can I get it to load up index.aspx automatically? ...