asp.net

Accessing the object/row being edited in Dynamic Data

I'm modifying the "Edit.aspx" default page template used by ASP.NET Dynamic Data and adding some additional controls. I know that I can find the type of object being edited by looking at DetailsDataSource.GetTable().EntityType, but how can I see the actual object itself? Also, can I change the properties of the object and tell the data c...

ASP.NET MVC returns wrong path for Url.Content

I have an ASP.NET MVC app which runs fine under the debugger running from http://localhost:9002/ But when I publish it to http://localhost/Zot/ the calls to Url.Content are returning incorrect values. I have script tags like <script src="<%= Url.Content("~/Scripts/util.js") %>" ... In the published site this produces: <script src="...

French letters on an aspx page

I have a winForm application that generates an .aspx file based on the user input in the application. The problem happens when a user enters the French letters like "é", "à", "è", "â", "ù", "ô", "ê" and "ç". It is supposed to look like a simple text on the page but it doesn't. Any ideas? ...

Duplicate html in a ASP.NET project

I have some HTML that will need to be duplicated in a number of places. If I externalize this to a text file and include it in the ASPX page, it would work but I will need to pass a parameter to this HTML (ClientID) Without having to create a User control, is there a lighter way of doing this? ...

How can I execute multiple database requests in ASP.NET C#?

In every ASP.NET application I have written, I would make number of request to the database before outputting the information onto the web page. For example: var DataTable1 = GetDataTable("Select * From Customers"); var DataTable2 = GetDataTable("Select * From Products"); var DataTable3 = GetDataTable("Select * From Orders"); As far...

Info on Web Application Compilation Model vs Web Site model.

Can anyone please give me a nice, expert but concise summary the ASP.NET compilation model with the older, code-behind style, web applications? I'm fairly familiar with the newer web site model, using partial classes and on-demand compilation, but I'm curious as to how ASP.NET marries the front-deployed ASPX pages to the pre-compiled co...

seating plan

I have to build a theatre seating plan. Admin should be given an option to right click, add row, delete row, add numbering to seats, add seat to a row or delete seat from a rom (similar to excel rows and columns and cells). Admin can also click on each row to put specific price for that seat. What is the best approach to get it done? ...

Error with server install of new MVC app and MVC Release Candidate 2

I have developed a small application using MVC RC2. The application works fine in my development environment, but fails when I push it to my production environment with the following error: Method not found: 'Void System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute (System.Web.Routing.RouteCollection, System.String)'. App pool is r...

How to write a database class that supports parameterized queries

I'm a former classic ASP programmer and sometimes PHP programmer writing my first ASP.NET application. I'm loving the much-improved ADO.NET functions, but I'm feeling the need to write a database class. Partly I want to consolidate the code that actually interacts with the database, and partly I want to reduce what feels like repetition....

ASP.net web site Release build include pdb files. How do i get rid of them?

Hi all, I use WebDepolymentAdd for VS 2008 to do the final build of my web site. This is web site and not web application project. I set the build to Release and not debug and after i did the build. In the bin folder it contain .pdb and .xml for third party .dll for example the AJAXcontrol and also .compiled file. Do i need to include ...

How can I do client side text formatting on a Data-bound field inside a repeater?

I have a repeater control with some html controls being populated from some server side DataSource. The code for these controls inside the repeater looks something like this.. <img src='<%# DataBinder.Eval(Container.DataItem, "Path")%>' title='<%# DataBinder.Eval(Container.DataItem, "Name")%>' alt=""> I needed to format some of the te...

Find control in ListView EmptyDataTemplate

I have the a ListView like this <asp:ListView ID="ListView1" runat="server"> <EmptyDataTemplate> <asp:Literal ID="Literal1" runat="server" text="some text"/> </EmptyDataTemplate> ... </asp:ListView> on my Page_Load event I have the following code Literal x = (Literal)ListView1.FindControl("Literal1"); x.Text = "o...

detailsview: automatic invoke insert or edit mode...

Table structure is as follows: id int identity firstname varchar(100) lastname varchar(100) I have an detailsview control that displays/inserts/updates firstname lastname on profile.aspx page. If customer lands on this page with id in querystring then I want it to load that record into detailsview via sqldatasource and have edit bu...

Backing up and Restoring SQL Server Tables from C#

Hi In a webapp I am building, I have a requirement in which I need to backup and restore around 10-15 tables from a SQL Server database. My solution.. -Backup: For each table, Fill a dataset , serialize that to a file -Restore: Deserialize the file into a dataset and use SQLBulkCopy Is this the best was to achieve my goal? ...

Is it possible to convert an ASP.NET control to a picture on the fly?

In ASP.NET, If I have an multi-line text box (or even a 3rd party rich text box), can I convert its content to a picture during postback? By convert I mean to keep the format & content in the picture. For example, I have a rich edit box, end user can add fancy text font and symbols directly on it, once they hit "submit", is there a way...

Definitive pattern for implementing templated data-bound controls in ASP.NET

I am working on a project at the moment where we are building templated data-bound controls (TDBC) for ASP.NET. The problem is it appears that nobody has really worked out the definitive pattern for how to do this - there are 3 or 4 different 'styles'. Not only that but many of the controls are giving the "cannot use databinding when ...

Using SSRS Webservice inside another Thread

I am calling the SQL Server Reporting Services Webservice from inside an asp.net application. I need to fire off all the subscriptions for a given report. But I don't want the user to have to wait around for it to all happen, so I want to have all the webservice calls inside a separate thread, and return to the user straight away. I am ...

Modify ToolTip of WebDayView Infragistics Control ASP.Net

I am using NetAdvantage 2008 ToolKit from Infragistics. In one of the forma I am using WebdayView here I need to modify the Tooltip of Activity. I searched the Infragistics Forum and came up with a lil solution i.e. WebDayView1.AppointmentTooltipFormatString = "Time: <START_DATE_TIME>-<END_DATE_TIME><NEW_LINE>Subject: <SUBJECT><NEW_...

How to prevent an ASP.NET application restarting when the web.config is modified?

I'm hosting the ASP.NET runtime via the ApplicationHost.CreateApplicationHost method. When I modify the web.config while the application is running, i see lots of first chance ThreadAbortExceptions thrown. This is right before my application comes crashing down. I'm assuming this is because the runtime has detected changes to the configu...

FindControl implementation

While debugging a problem I'm having on a DetailsView finding a control in one of the templates I encountered something strange. I have implemented a recursive FindControl Extension, and it where finding a control with an id completely different from the one I where searching for. the implementation is basically calling Findcontrol on th...