asp.net

Can I get the query that was executed from the SqlDataSource?

I have a sql query for my SelectCommand on my SqlDataSource. It looks like the following: SELECT * FROM Books WHERE BookID = @BookID A TextBox feeds the @BookID parameter using an Asp:ControlParameter. When I view the SelectCommand when stepping through the code, I see this: SELECT * FROM Books WHERE BookID = @BookID What I want ...

Hidden Field altered through javascript not persisting on postback

I have a web user control with a hidden field on it. When a javascript event (click) ocurrs, I am trying to set a value in the hidden field, so that the value can be retained on postback and remembered for the next rendering. The control is a collapsible panel extender that does not cause postback, uses jquery, and if postback occurs e...

ASP.NET Themes - Should They Be Used?

I'd been reading up on themes in my ASP.NET book and thought that it could be a very handy solution, then I met some problems. The theme picks up every single CSS file in the folder If you want to use reset styles (where ordering is important) the order of imported stylesheets is not guaranteed Your master page would not explicitly ind...

opening a default index.html file inside a folder (asp.net)

I'm a real noob when it comes to asp.net/html. I'm developing a very basic web site using VS 2008. At this point it's mostly just html pages - no real ASP.NET I have a root index.html and then a set of folders like css/ images/ features/ etc. and index.html files inside them, so one can access it as http://www.blahblah.com/features a...

How to tell if a Request is coming from a Proxy?

Is it possible to detect if an incoming request is being made through a proxy server? If a web application "bans" users via IP address, they could bypass this by using a proxy server. That is just one reason to block these requests. How can this be achieved? ...

Building the DropThings ASP.NET Solution

Hi all, I'm attempting to build a project called DropThings but I am getting all these errors and I'm not sure how to resolve them. Can anyone lend a helping hand? I'm wondering if anyone else can build the website and if so, what steps it took you. Thanks in advance! Source Code: http://code.google.com/p/dropthings/ My Configurat...

CSS on Email

Hi Has anyone found a good way of embeding CSS in a programatically produced email. The best way I have found is to put the style code into a resource file and call it into the code. An emample would be Dim objBuilder objBuilder = New StringBuilder objBuilder.Append(Resources.SystemEmail.CSSStyle) objBuilder.Append("My Styled Email"...

How do I dynamically add and remove line items from an ASP.NET MVC view?

I have a PurchaseOrder model: public class PurchaseOrder { public string OrderNumber { get; set; } public string Customer { get; set; } public IList<LineItem> Lines { get; set; } } and a LineItem class: public class LineItem { public string PartNumber { get; set; } public int Quantity { get; set; } } What I ...

ASP.Net set_MaxCharactersFromEntities(Int64)

We are trying to use the Facebook Toolkit API which is built with 3.5. We copied over the dll from ASP.NET 3.5 and try to run the site. It works for the most part but when calling the following function in one of our pages, the follow error shows up. Method not found: 'Void System.Xml.XmlReaderSettings.set_MaxCharactersFromEntities(Int6...

append conditional html file output with xml response

hey guys i have a restful xml service where client passes current version of html they are viewing. if the version on the server is the same as the client, i just respond with the current server version in xml. example: <Response ServerHTMLVersion="1" /> however if server html version is greater than current client version, i still spit...

Sys undefined for HTTPS url in IE8

I just discovered a rather peculiar issue in IE8 for a HTTPS link. Every time the page tries to access the HTTPS link, it produces an error. This happens only in IE8 and nothing else. Any idea what's going on? I found some items that said that means the files were not loaded, hence the issue and tried some fixes recommended, but they ...

Where does lucene .net cache the search results?

Hi, I'm trying to figure out where Lucene stores the cached query results, and how it's configured to do so - and how long it caches for. This is for an ASP.NET 3.5 solution. I'm getting this problem: If I run a search and sort the result by a particular product field, it seems to work the very first time each search and sort combinati...

What are the available functions to send notifications to a Facebook user?

Currently I am using Codeplex's Facebook Developer Toolkit version 2 for my ASP.net Facebook application. I would like to be able to send notifications to a user's Inbox or wall of the application and was wondering what are the available functions to do that? If not in the API, then please provide example functions from the main Facebo...

Internet explorer css overflow Problem

Hi all, I wanted to know if there was a way to fix scrollbar issue i'm having with ie7. Here is my CSS .gridContainer { height: 500px; width: 410px; background-color:#fff; border:1px solid #6699CC; overflow:auto; } .Grid {background-color:#fff;width:100%;} .Grid td { border-top:1px solid #C4DDFF; height:13px; min-width:30px; text-al...

Add hover image (CSS) to ASP.NET link button in a DataPager

I add hover images to .Net LinkButtons using the following method: .rollover a { background-image:url(/images/shoppingcart/butpill_continue.gif); } .rollover a:hover { background-image:url(/images/shoppingcart/butpill_continue_over.gif); } <div class="rollover"> <asp:LinkButton ID="btnContinue" runat="server"></asp:LinkButton> <...

Asp.net "Global" variables

I'm writing a page in ASP.NET and am having problems following the cycle of initialization on postbacks: I have (something akin to) the following: public partial class MyClass : System.Web.UI.Page { String myString = "default"; protected void Page_Init(object o, EventArgs e) { myString = Request["passedString"]; ...

How to get ASPNET to be recognized as a Trusted Connection by SQL Server 2005

Here's the situaiton. I'm working on developing a new website to access an old database. This is a DoD installation so there's lots of security around. The current application is written in classic ASP, VBScript and some javascript. The new systems is ASP.NET. Accessing the database in the old system meant hitting the server with yo...

How can I teach a beginner to write ASP.NET web applications quickly?

Related: Best ways to teach a beginner to program? I am teaching my brothers ASP.NET programming and they are starting with a very small amount of background knowledge. They know things like declaring a variable, what a class is and what a page is. I want to teach them to be good web developers in the shortest amount of time. The ...

ASP.NET Deployment Tool

Before I re-invent the wheel I wanted to see if a similar tool already existed. I want to automate the deployment of our various web sites, web services & multiple databases. I was thinking of writing a NAnt script and a simple GUI application which would enumerate the targets within the NAnt script and show a list of tasks which could...

What is the best way to manage settings (configuration) in ASP.NET 2.0?

I have a project for which we are extending some functionality from an existing client into a web portal in ASP.NET 2.0. The client is windows forms based (in .NET 2.0). It has some settings that are kept in the Project > Properties > Settings.settings system, including a generated settings.Designer.cs file. This file provides nice autom...