asp.net

How to apply dynamically created controls to a catagory.

(C#/SQL/Approach-question) This has to be one of the hardest nuts I've ever had to crack. So I sincerely hope one of you smart people out there have tried to solve this before! :) I have a much of catagories (A,B,C) with pictures. For each picture I need to ascribe some information, based on some controls that have either no- or pred...

(GoogleChartSharp) Why is this Google Charts scatter chart all messed up?

Hey gang, So I'm putting together a little code metrics report based off of usage data I've been collecting via the CodeSharp AOP libraries. Here's what the piechart data looks like: However, here's what I'm getting for the scatterchart: Here's the code, modified to change the datasets into literal arrays and minus the labels: ...

Customized Sharepoint List Add/Edit page is slow to load

I have a list with about 3000 items in it. The editing page is taking forever to load but the rest of the site is fast. I thought it had to do with having a Lookup column on the page and using the multiselect drop down but after replacing it, I am seeing no difference. The page is about 118kb and take about 5 min to load. Any ideas o...

How to force Images to be loaded all the time, ASP.NET

I am serving a .aspx that contains Images. I haven't figured out yet how to force ie7(6) to fetch the images all the time (e.g redirects). So far, I've added the following tags on my .aspx page: <META Http-Equiv="Cache-Control" Content="no-cache"> <META Http-Equiv="Pragma" Content="no-cache"> <META Http-Equiv="Expires" Content="0"> ...

ASP.NET: Bind Repeater using JQuery?

I have a Repeater control that I bind server-side. It repeats a series of divs, and does so with no problem. I have some buttons that I use to sort the repeater (newest, highest ranked, random) and this works the way it should. I would like to improve my user experience by making the buttons sort the divs using ajax/jquery somehow so t...

a:hover not overriding parent class

I have an aspx page with a Masterpage containing a panel with a CssClass of "menutoolbar". Within that panel I am placing objects, in this case a linkbutton with a class of "SearchLink". In my Stylesheet, I am defining .menutoolbar a:hover { color: red } .Searchlink a:hover { color: yellow } When I hover over the Searchlink link it ...

asp.net dropdownlist - add blank line before db values

Hi, On my page I have a dropdownlist which gets populated by database values from an SqlDataSource(see code) How can I add my own text or a blank line before the values... <asp:DropDownList ID="drpClient" runat="server" Width="200px" AutoPostBack="True" DataSourceID="dsClients" DataTextField="name" Da...

HttpContext.Cache Expiration

Is there a way to specify how long data is held in HttpContext.Cache? ...

Asp.Net Membership with ActiveDirectoryMembership Provider.

We're having speed problems still with the login control and the Ad membership provider. We've tracked it down to a specific issue, when initally trying to connect for the first time, it sends this SAM LOGON message: 117 10.717526 10.140.4.84 10.140.4.223 SMB_NETLOGON SAM LOGON request from client It Gets sent 4 seperate time on udp p...

Partial Validation ASP.NET MVC

I've read a number of articles now in regard to validation and asp.net mvc and the majority tend to point to validation in the model. The problem I see with all of them is that they don't handle different scenarios, or at least, they don't show how they would be achieved e.g. When creating or updating a user account the email address mu...

Dynamic LinqToSQL pivot table query

Hi All http://img7.imageshack.us/img7/3050/downtime.png I have two calendar pickers ( To and From ) I need to build the Year1 -> 4 dynamicly. I am also getting dupplicate records for 1 items that have values for 2006 and 2009. They can select 100 years if they wanted too.Check attached image. public ActionResult DownTimeSummaryTabu...

Cookie only displayed on refresh?

I have some trouble understanding this one so here it is. I'm trying to set a cookie and display the value on the page using ASP.NET + C#. here's my code: protected void lbChangeToSmall_Click(object sender, EventArgs e) { Response.Cookies["fontSize"].Value = "small"; } and <asp:LinkButton runat="server...

Why is the DataBind() method necessary?

Simple question, I guess. For a long time I've blindly followed a (supposedly) common pattern when programmatically databinding my ASP.NET controls. Namely: gridView1.DataSource = someList; gridView1.DataBind(); However, if I were setting my GridView to bind to a DataSource control via the DataSourceID property, the call to DataBind(...

registerClientScriptBlock in custom handler?

I'm using a custom control in ASP.NET that handles file uploading for me. The control has a handler in the code-behind using something like this: Protected Sub UploadFileComplete(ByVal sender As Object, ByVal e As UploadControl.FileUploadCompleteEventArgs) Handles UploadControl.FileUploadComplete Within that sub, I post back to the se...

LINQ to SQL and DataPager

I'm using LINQ to SQL to search a fairly large database and am unsure of the best approach to perform paging with a DataPager. I am aware of the Skip() and Take() methods and have those working properly. However, I'm unable to use the count of the results for the datapager, as they will always be the page size as determined in the Take...

C# class to deal with web vulnerability

Does anybody has ever created any class consisting of functions to deal with web security vulnerabilities. I do know that we can do avoid by adding some config settings like validaterequest and enableheader. ...

Triggering multiple validation groups with a single button?

Let's say the page TestPage.aspx has two controls. The first control is an address control that has a validation group called "AddressGroup". This group contains several validation controls which are colated in the validation summary on that control. The second control is a credit card control and has a validation group called "Credit...

Simple databinding to gridview columns

I have a GridView that I use to show my users the result of a search. I want to allow them to choose which columns are shown on the GridView when performing their search. Simple enough, yes? I wanted to try doing this using just databinding, no events. Unfortunately, my code fails to update the GridView using checkboxes bound to the colu...

WebServices fail because (400) Bad Request because of special character.

Using Visual Studio 2008, I setup a client that uses Web Services. It has nothing to do with buffer sizes (as that is a typical response, all appropriate sizes were increased). I was using a List as the parameter of the Method. After much experimentation, I used the System.Net.WebClient to manually create a Soap 1.1 and a Soap 1.2 reque...

How Does ASP.NET Parse Pages?

I'm looking for an article that will dive deep into how ASP.NET works and how it renders controls from XML markup. For example, under the hood, how does ASP.NET take the following markup and have it produce the results we see? <asp:Label ID="MyLabel"><%= myObject.Text%></asp:Label> Does anybody know of any article that will dive deep i...