asp.net

How to unit test a grid with paging

A common web UI design is to display a sortable grid (GridView, ListView, DataGrid) with paging. That is, the user can click on any column header to cause the records to be sorted in ascending or descending order on that column's data. And, the user can navigate among the pages of, say, 10 records at a time. There may be millions of da...

Add my linq query resultset to a dataset, c# asp.net 3.5

My query is: var query1 = from u in dc.Usage_Computers.AsEnumerable where u.DomainUser == s3 orderby u.OperationTime descending select new { u.ProgramVersion, u.OperationTime, u.IPaddress, u.ComputerName, ...

asp.net wiki user control

I'm writing a asp.net web application in which I want the users to be able to apply simple formatting to the text they enter in text areas. One of the possibilities is to use a javascript wisywig editor (like tinymce). However, to keep the text html-clean and readible, I'd prefer that the users have to do the formatting themselves in ex...

How do you change a hashed password using asp.net membership provider if you don't know the current password?

Problem, there's no method: bool ChangePassword(string newPassword); You have to know the current password (which is probably hashed and forgotten). ...

How do you pass a Container.DataItem as a parameter?

I'm using a repeater control and I'm trying to pass a parameter as such: <%# SomeFunction( DataBinder.Eval(Container.DataItem, "Id") ) %> It's basically calling: public string SomeFunction(long id) { return "Hello"; } I'm not able to achieve this as I get an error: error CS1502: The best overloaded method match ... S...

Any free ASP.NET 3.5 App host?!

I want to host a test app in ASP.NET 3.5 but I can't find a decent free host anywhere! I tried http://www.aspspider.com/ and after some days I still have a pending virtual directory creation. Even if it has lots of banners with pub on it, it doesn't matter. I just want to try out something! Thanks. ...

Anyone know of a free date and *time* ASP.NET custom control

Every time I have to build a form with a DateTime field I try to find a decent free custom control - I always fail. I cannot figure out why it isn't built in the .NET but let's forget about for a minute and concentrate on my question :D Anyone got one? ...

How to make 4 columns across in ASP.NET MVC - How to make my current code suck less

I have the following code, I'm trying to get a table with 4 columns across. If I run out of columns, create a new row and make 4 more coumns. rinse. lather. repeat. <tbody> <% int i = 0; foreach (ItmXtnMultimedia multimedia in ViewData.Model.ItmXtnMultimedia) { if (i%4 == 0 && i== 0) { %><tr><% } if (i%4 == 0 && i != 0) { ...

Response.Write DataTable Data to Text File, ASP.net Hangs

Very odd problem as this is working perfectly on our old Classic ASP site. We are basically querying the database and exporting around 2200 lines of text to a Text File through Response.Write to be output to a dialog box and allows the user to save the file. Response.Clear() Response.ClearContent() Response.ClearHeaders(...

IIS 6 Compress static files when using Wildcard application mapping

I'm using IIS 6 with EPiserver CMS which requires all requests to go through aspnet_isapi.dll. I want to gzip all my static files (js, css mainly). Trying to setup compression in IIS didn't work. Is there a setting in EPiServer that will allow me to achieve this? Can .net framework compress files automatically? ...

Best Practices for uploading files to database

I am looking for any best practices or ideas on how you would create an interface with a DB from a .NET web application to upload data from Excel files Should I use a mechanism that allows all the records to be loaded and flags the errors or should I use a mechanism that stops the load when an error occurs. I've never had to deal with t...

Using mySql data in ASP.NET application

I am a newcomer to ASP, and would like to experiment with it by writing a website for a club at my school using .net 2008 and the mySql database available from the school's apache server. What is the best way to set this up, since I see a lot of options to connect the web app to SQL Server or Oracle databases, but I'm nervous that it wo...

Dynamically built SelectCommand for GridView SqlDataSource in asp.net

I'm working with a GridView that uses a SqlDataSource element that looks like this: <asp:SqlDataSource ID="InventoryDB" runat="server" ConnectionString="<%$ ConnectionStrings:InventoryConnectionString %>" SelectCommand="SELECT [Server], [Customer] FROM [Website] WHERE [Owner] = 'someOwner'"> </asp:SqlDataSour...

ASP.net Forms/DropDownList Help

I have created 2 dropdownlists that are binded to a SQL DB and then pulling up a GridView. But, more specifically is there a way to have 3 user picked boxes and then have a Gridview show up? I would like to have a quick efficient way to do this without problems. I created the first 2 DDLs with autopostback and not working properly. a...

Does it matter if I use RowDataBound or DataBound for a GridView

According to the VS 2008 properties for a GridView: DataBound fires after the control has been databound. RowDataBound fires after a row has been databound. If I want to manipulate the text in a header column, does it matter if I use the DataBound or RowDataBound because I can always just check the e.Row.RowType. Is there an actual ...

How do I log cross-domain intranet traffic (including username) using a HTTPHandler?

I am attempting to log user activity for a couple internal websites as well as our SharePoint sites. I use JavaScript to make a call (GET) to an ashx page (HTTPHandler) that returns a 1x1 invisible GIF. The HTTPHandler grabs the referring URL, browser info, ip address, the action (sent as a QueryString), and (the part I'm strugging with)...

Configurable Columns in ASP.NET

Does anyone have a suggestions as to the best way to allow users to select which columns appear in a datagrid? I would like them to be able to set this up. It would be stored with the user in a profile and loaded each time the user loads the grid. I was thinking about something with ASP.NET personalization. ...

Application_End global.asax

Can anybody tell me when Application_End is triggered in a lifecycle of an application? When all sessions are ended, will Application_End be triggered automatically? + Are there any other reasons why Application_End could be triggered? Thx. ...

What is the best way to implement background services for an ASP.NET application?

My ASP.NET application needs a number of supporting services to run periodically in the background. For example: I need to query the database (or cache) every 1-5 minutes, identify overdue work items and notify users by email I need to generate nightly reports that are then emailed to subscribers Plus other system/non-user admin tasks ...

How to properly set up Application Pools for IIS6

I am really stuck with this Parser Error Message telling me "Could not load the assembly 'App_Web_amlohswi'. Make sure that it is compiled before accessing the page." I have been looking around for a few hours checking different posts here and googling information. I have found out that I need to set up a new Application Pool that runs...