asp.net

MVC site using relative paths for links instead of view syntax

EDIT!! I should add that this site runs perfectly locally. It's only when deployed that there's this issue ORIGINAL POST: I have a site I just put up http://splattonet0.web704.discountasp.net/ Which loads the Index view of the Home controller just fine. However, when one clicks the links to the left, the webserver is looking fo...

How to access asp.net dropdown TEXTISDIRTY property

I have a couple asp.net 1.1 dropdown boxes that I'm using javascript to manipulate on change. When I try to access these dropdowns in the code behind the needed values are in TEXTISDIRTY. Is there any way I can access this property? I'm assuming it's doing that because of the javascript. Thanks. ...

Proper way to use JQuery when using MasterPages in ASP.NET?

I have no issues when doing using JQuery in a aspx page without a masterpage, but when I try to use it in pages that have a masterpage, it doesn't work, so I end up putting the jquery files and other script files in the page instead of the master. Now if I have 10 pages, I am doing this for all 10, which I know is incorrect. In the sam...

How to create an excel file and deliver to the screen using C# in a MVC project?

Please send code samples if you can, Thanks! ...

UpdatePanel - Any ideas on how to avoid a flicker in UI? - ASP.NET/Jquery

I have rather a complex UI. However, for the purpose of this question, let's say that there is a HTML table that renders UILayout1 by default (say default mode). There is a button that a user can use to toggle between the default mode and a preview mode (UILayout2) When in preview mode, there are some columns in the table that are invis...

How to check for an Empty Gridview

Hi, I have an ASP.NET 2.0 (C#) web app, and in it I have a gridview that gets its data from an oracle database. I want to know how to check if the gridview is empty, and the do something. I have already tried: if(GridView.Rows.Count == 0) { // Do Something } but it doesn't work... Any ideas? Thank you. ...

Sharepoint controls in ASP.NET application

Is there a way I can use the sharepoint controls in a ASP.NET web application like any other controls that come out of box for ASP.NET? If yes, what are the pre-requisites I need to install? Thank you, Harsha ...

ASP.NET Dynamic Data DisplayColumn Attribute Causing Sorting Issue

Using ASP.NET Dynamic Data with a LINQ to SQL DataContext from the Northwind Database... When I add a DisplayColumn Attribute to one of my LINQ to SQL "entity" classes and reference a property from my custom code in the partial class, I lose the ability to sort by that column in the generated GridViews. I continue to lose the ability t...

Unable to connect to Web Developers built in web server

When I yesterday returned to Visual Web Developer I was no longer able to run/debug my projects. Clicking the green play button launches ASP.NET Development Server (and it shows up in the systray) but the browser only shows the error message "Firefox is not able to connect to localhost:58127" (translated from Swedish). IE7 says "Cannot s...

List of Advanced ASP.NET & AJAX Books

I have read both beginner and intermediate books, and I am now looking for expert books written for ASP.NET(2 or 3.5) or AJAX. Do you have any suggestions for some free resources? ...

Dissapearing data in a GridView

I have a page with a GridView bound to a custom ObjectDataSource. Grid has a selection ability which triggers FormView to retrieve selected index and use it as a parameter for a SELECT to get details about specific item. The problem is when I select a row in that grid on a page where there are less items than PageSize (Paging is enabled,...

GridView's Automatic paging doesn't work

Hello, According to my book all that is needed to start using automatic paging is to set GridView.AllowPaging to true. But when I try to navigate to another page, I get GridView fired event PageIndexChanging which wasn't handled exception. I then have to create event handler for PageIndexChanging event, but then when I navigate to nex...

How do I get SELECT elements to display after calling Hide() on a modal popup?

When I call Hide() on a ModalPopupExtender in ASP.NET on server side, all the SELECT elements on the page are hidden in IE6. Does controlling the AjaxControlKit.ModalPopupExtender from the server side with Hide() and Show() mess things up? ...

How do I override page load lifecycle in ASP.NET to prevent ASPX form from loading?

I need to test a condition in several ASPX code-behind files and, in some cases, would like to completely bypass the normal page load process so that the corresponding ASPX page is not loaded. Intead, I'd like to send a custom response to the browser that's written from a code-behind method. Does anyone know where to start- what method...

HTML to PDF Keeping Look and Feel

So I have been using iTextSharp to do a HTML -> PDF conversion, overall it works fairly well, but it doesn't seem to be liking most of the formatting. Bold, Italic, and Underline are all working, however, none of the font sizes, styles or other information is being followed, therefore the export doesn't look much at all like the HTML th...

If Sql Server returns an error, then SqlException should be thrown. But it isn't

Hello, If I bind GridView to SqlDataSource and also set AutoGenerateEditButton to true, and if I then try to update a field ( this field being a primary key in database ), then database should return an error and thus SqlException should be thrown?! So why doesn’t page report an exception? Instead, all Gridview does is setting all ...

ASP.NET threading + design question

I have an application that performs a write to a database each time a page is requested. This db write is not time critical, so for performance reasons, I have the page queuing the object using MSMQ. Of course, I have to have something to read the queue and process requests, so I wrote a class that looks similar to this: public class Qu...

Right way to implement data binding in ASP.NET

What is the right way to implement DataBind() method for control which have a repeater inside of it? These are requirements for this control (but you can offer yours if think these are missing of something or are an overhead) Control should accept a collection or an enumerable (list of objects, anonymous objects, dictionaries or data ...

ASP.Net Display Images in a GridView span across columns and rows? Using C#

I have some thumbnails I want to display in a Gridview. I am not familiar with all the customization that is offered. Basically I want to store the images in a Gridview, maybe spanning 5 columns wide...and then however many rows it takes to complete the rest. I don't want any column or row titles, and really don't want to see evidence of...

ClientScriptManager.RegisterForEventValidation with HiddenField

I am trying to use to use ClientScriptManager.RegisterForEventValidation to register a hidden field and value that I am adding with ClientScriptManager.RegisterHiddenField. I doing this during the Render event. I get no error, but ASP.NET 2.0 does not appear to be validating the field. I can change the value or delete the entire field...