asp.net

SQL Query Conversion to LINQ Left Outer Join (VB.NET)

I've looked all around and spent way to long trying to convert this SQL statement into a Linq statement in VB. I'm sure it would be a good example for others out there - the statement is trying to pull products that have a many-to-many relationship with product categories, and the categories have a hierarchy of parents/children. Here is...

HttpContext.GetGlobalResourceObject always returns null.

Hi folks! I created two files in the App_GlobalResources folder: SiteResources.en-US.resx SiteResources.sp-SP.resx Both contain a value for "SiteTitleSeparator". Here is what I am trying to do (The following line always returns null): string sep = (string)GetGlobalResourceObject("SiteResources", "SiteTitle"); Note, that the Cultu...

Control ID rendering differently between environments

I have a web application that works in our stage/test environment fine but once we moved it to our production environment something weird happens. All the control ids change. For example a label went from ctl00_cphMainContent_lblPetName to _ctl0_cphMainContent_lblPetName. Why would this happen? What could cause something like this to h...

What's better: DataSet or DataReader ?

I just saw this topic: http://stackoverflow.com/questions/2250/datatable-vs-dataset but it didn't solve my doubt .. Let me explain better, I was doing connection with database and needed to show the results in a GridView. (I used RecordSet when I worked with VB6 while ago and DataSet is pretty similar to it so was much easier to use Data...

ASP.NET Master Page: Event Validation Error

Hi I included a repeater in my master page. The repeater has a button that I set its CommandArgument. However when I click the button I get the following exception: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page....

Problem with HTML? Scrollbars Not Appearing via window.open

I have a VB.NET web application where I am opening a window when a user clicks on a link to view some external tabular data. The data I'm displaying definitely requires a vertical scrollbar in order to see everything...For some reason I cannot get a vertical scrollbar to show up when the new window loads. Here's the JS that opens the wi...

Non-Windows RAD Web development

I have spent most of my web-development career in the Microsoft camp, but for different reasons I am trying to look at options. Some years back I did a bit of Java/Struts development in eclipse, which was nice for its time but my memories of it are not close to what Visual Studio delivers today. Some of the strengths of the MS stack a...

How can I send a 301 Permanent Redirect with ASP.NET ?

I need to permanent redirect some pages, and redirect the user to the new URL as well. This code only sets the correct headers. The user are not redirected. public static void PermanentRedirect(this HttpResponse response, string newUrl) { response.Status = "301 Moved Permanently"; response.StatusCode = 301; response.AddHeader("Lo...

jquery .ajax, google visualisation and problems getting them to work together

Hi, I'm trying to use jquery's .ajax(), google visualisation annotated timeline and one of the google datatable helpers together. Ultimately what i'm after is having a link on a page and when the user clicks it data is loaded asynchronously via jquery.ajax(), returned as google visualisation compliant JSON and passed to the charting API...

How to use EntityFramework connection string for Elmah?

In ELMAH for logging errors to the database you can write: <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="EducoparkEntities"/> However, if I use EntityFramework, this doesn't work because the connection string for EF contains metadata as well: <add name="EducoparkEntities" connectionString="metadata=res:/...

SqlCacheDependency in n-Tier Architekture

I read some articles about SqlCacheDependency. I think it is a really cool way for updating caches, but i'm not sure how i can handle this technologie if my application is a n-tier architekture. Is this just useful if my program is a small webapplication, or is there also a way for use in big n-tier architektures? ...

How to connect Calendar control with existing Membership system in ASP.NET?

Hi, I have a built-in Membership system in ASP.NET and I handle member data with Profiles in web.config. I would like to add an Event Calendar where a member could add notes to any day he wants but I don't know how to integrate the Calendar control with the existing Membership system. I can't query a database because I don't handle me...

ASP.Net: Conditional Logic in a ListView's ItemTemplate

I want to show certain parts of an ItemTemplate based according to whether a bound field is null. Take for example the following code: (Code such as LayoutTemplate have been removed for brevity) <asp:ListView ID="MusicList" runat="server"> <ItemTemplate> <tr> <% if (Eval("DownloadLink") != null...

MaskedEditExtender in asp.net

How can I useMaskedEditExtender for textbox that should accept address of website? thanks ...

How Do I Change the render behavior of my custom control from being a span

When writing a custom control it always rendered as an HTML span element. How can I change it for example to a div? ...

Best way to preserve Line Breaks in ASP.NET

I have some text coming in from a textarea and want to preserve the line breaks etc. So when I put the content back on the screen it looks correct! What's the best way to do this in asp.net. ...

ASP.NET page to image or pdf.

Hi everybody. I have an asp .net page like this: http://farm4.static.flickr.com/3631/3690714302_c17b259863.jpg My Table is Gridview and some Label, anybody can tell me how to create a button to convert my page to image or pdf file and save it to desktop. Help me please T__T. ...

ASP/ASP.net: Web-based JET database management tool?

I need to manipulate some tables in a JET database housed on a web-server: check existing indexes change table cluster/primary key see what tables exist rename tables add tables drop tables browse data etc I don't have the option of installing PlaneDisaster or Access (even if i had it) on the local machine. I've already written a ge...

Processing events on Dynamically Loaded User Controls

I have a number of pages that I need to Dynamically Load User Controls and process events on controls on them. I have included sample code below for a trivial example. Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/...

Blog engines for ASP.Net (maybe MVC) web sites

I've built a web site on ASP.NET MVC and one little section of it should be a blog. I'm looking for a blog to integrate. In the worst case scenario it'd be a WordPress with a custom skin and RSS integration to the rest of the site. The best would be to have an ASP.NET MVC add-on, but I can live with ASP.NET WebForms. Do you have any rec...