asp.net

Sanitizing Database Return Data

I am wondering what everyone thinks the best method of handling results from your own database is. Other teams may be involved and there is always the chance the procedure/data could be altered and erroneous results would occur. My question is this. Is it better to let and exception occur, catch and log it or try to handle all contingenc...

Using the same asp panel in multiple tabs

In the Ajax toolkit you can use a Tab Container and add TabPanels to this. I have some controls that I want to be able to use across all tabs and the tailor the tabs with other controls as neccessary. My question is how do I reuse a panel on multiple tabs? Essentially I after something like this <TabContainer> <tabPanel1> <contentT...

Reloading configuration without restarting application using ConfigurationManager.RefreshSection

Has anyone got this working in a web application? No matter what I do it seems that my appSettings section (redirected from web.config using appSettings file=".\Site\site.config") does not get reloaded. Am I doomed to the case of having to just restart the application? I was hoping this method would lead me to a more performant solut...

What is the optimum limit for URL length? 100, 200+

I have an ASP.Net 3.5 platform and windows 2003 server with all the updates. There is a limit with .Net that it cannot handle more than 260 characters. Moreover if you look it up on web, you will find that IE 6 fails to work if it is not patched at above 100 charcters. I want to have the rewrite path module to be supported on maximum...

Conflict between Google util.js and ASP.NET AJAX?

I'm trying to use Google's jstemplate as a client-side templating engine on an ASP.NET page, and it seems to be conflicting with ASP.NET AJAX. The problem is not jstemplate.js but util.js, which it needs as a support file. I've isolated the problem as follows:: <%@ Page Language="VB" %> <body> <form id="form1" runat="server"> ...

How do I make a tag cloud in ASP.NET?

I'm venturing into web programming for the first time and would like a nice way to display a frequency indicator of some data, in the form of a tag cloud. For example, pretend I have some simple data of three types of pets: Dog, Cat, Monkey. There are 5 Dogs, 27 Cats and 101 Monkeys. Given this data, what's the best way to make a tag...

Call Javascript function and return value from ASP .NET

Lets say on my page I have this function: function ReturnFoo(bar) { return bar.toString() + "foo"; } Now, I would like to have this called from ASP .NET, hopefully with the ASP .NET AJAX framework, as I am already using it in this codebase (I have already spent the 100k, might as well use it). Also, I would like to get back the...

Visual Studio 2008 Design Surface Error: "The operation could not be completed. Invalid formatetc structure."

In a VS2008 web site project, I have a page open in split view. I try to drag an Infragistics web control onto the page's design surface. Nothing happens. I try to drag same onto the htmlz. Dialog box with The operation could not be completed. Invalid formatetc structure. Subsequently the dragged control does not appear in the de...

Problem with width of auto-generated columns in DataGrid

Maybe world peace would be easier, but I have a problem with the widths of auto generated columns when a DataGrid has no rows. The column headings all squeeze up with no spacing between them. I've tried adding the following CSS to no avail: td.gridHeader { padding-left:20px; padding-right: 20px; } ...

ASP.NET jQuery error: Unknown Web Method

This is my first time attempting to call an ASP.NET page method from jQuery. I am getting a status 500 error with the responseText message that the web method cannot be found. Here is my jQuery $.ajax call: function callCancelPlan(activePlanId, ntLogin) { var paramList = '{"activePlanId":"' + activePlanId + '","ntLogin":"' + ntLogin...

ASP.NET: How to access repeater generated form input elements?

i'm want to have a repeater generate a bunch of checkboxes, e.g.: <tr><td><input type="checkbox" name="t" value="11cbf4deb87" /> <input type="checkbox" name="a" value="33cbf4deb87" />stackoverflow.com</td></tr> <tr><td><input type="checkbox" name="t" value="11cbf4deb88" /> <input type="checkbox" name="a" value="33cbf4deb87" />microsoft....

Why is LINQ to SQL converting my string parameter to a column name?

This Linq to SQL query ... Return (From t In Db.Concessions Where t.Country = "ga" Select t.ConcessionID, t.Title, t.Country) ... is generating this SQL: SELECT [t0].[ConcessionID], [t0].[Title], [t0].[Country] FROM [dbo].[Concessions] AS [t0] WHERE [t0].[Country] = ga ... when what I want is WHERE [t0].[Country] = 'ga' Any ...

Generating a Reporting Services 2005 PDF report and storing it on disk

Is there an easy way to generate a PDF report from an RDL that's been uploaded to Report Manager and put that file somewhere on the server's disk? I already have a location on disk to put the file, I just need to know how to programmatically generate the PDF. This is for SQL Server 2005 Reporting Services. Code in either VB or C# is fine...

Where are the DataValueField values for a CheckBoxList stored?

I have this CheckBoxList on a page: <asp:checkboxlist runat="server" id="Locations" datasourceid="LocationsDatasource" datatextfield="CountryName" datavaluefield="CountryCode" /> I'd like to loop through the checkbox elements on the client using Javascript and grab the value of each checked checkbox, but the values don't appear to ...

DataReader or DataSet when pulling multiple recordsets in ASP.NET

I've got an ASP.NET page that has a bunch of controls that need to be populated (e.g. dropdown lists). I'd like to make a single trip to the db and bring back multiple recordsets instead of making a round-trip for each control. I could bring back multiple tables in a DataSet, or I could bring back a DataReader and use '.NextResult' to ...

Losing Button.Click events after first partial postback in UpdatePanel

I have a Page that has a single instance of a UserControl that itself has a single UpdatePanel. Inside the UpdatePanel are several Button controls. The Click event for these controls are wired up in the code-behind, in the Init event of the UserControl. I get the Click event for the first button I push, every time, no problem. After ...

Sharepoint InputFormSection control look-a-like

I'm looking for a similar control to the InputFormSection control in Sharepoint that I want to use in a regular web page that doesn't run in the context of Sharepoint. Here's how the inputformsection looks like : http://graegert.com/wp-content/uploads/2008/01/moss_adminarea_page_structure1.png ...

How do you deal with connection strings when deploying an ASP.NET site?

Right now our test and production databases are on the same server, but with different names. Deploying has meant editing Web.config to change all the connection strings for the correct database. A step which I forget all too frequently... We've finally created a new database server for testing, and I'm moving the databases over... b...

asp.net output data from DB without any html markup

I'm new to jquery and asp.net so please forgive if this is an obvious question. I'm using a jquery autocomplete plugin which requires that the page it looks up asynchronously for data is in this format as pure text only: product1|price1 product2|price2 product3|price3 WITHOUT ANY OTHER HTML MARKUP. Any other html tags seems to cause pr...

Close Browser Window after Form Post

Here's my situation. I have a button on my ASP.NET webform. This button creates a new browser window pointing to a page which has a lot of hidden fields (which are dynamically generated). This form submits itself to SQL Reporting Services on the bodies onload event. This works fine and the report is displayed in this new window. Howeve...