asp.net

Javascript file download not working on IE6 and IE7

I have the following code Response.TransmitFile(filePath); Opens the new window using the following line of code this.Page.ClientScript.RegisterStartupScript(this.GetType(), "Download", string.Format("window.open('{0}', target = 'new');", downloadURL), true); This works on IE8 however doesn't work on IE6 and IE7 anyidea what might...

How to capture session information from PHP in ASP?

Hi, I'm working in a website that is going to work like a landing point, providing a specialized service for many other websites. Users log-in to different sites and those sites have links to my website. Now, I want to create my website using asp .net, and also I want to be able to use SSO (Single Sign-On) so the users doesn't have to ...

ASP.NET - Advanced Where-Clause in LinqDataSource

I have two tables: Orders OrderProducts - An order can have 1 to many orderProducts records associated with it. What I am trying to do (unsuccessfully) is to implement a GridView search using a LinqDataSource wherein the search returns Order results where any of the OrderProduct.Manufacturer columns contain a search query. I was ho...

PeterBlum SelectedIndexCondition Not Equal functionality

Right now we are using the PeterBlum SelectedIndexCondition to control whether or not some controls are displayed using the following snippet: PeterBlum.DES.MultiFieldStateController fsc = new PeterBlum.DES.MultiFieldStateController(); PeterBlum.DES.SelectedIndexCondition cnd2 = new PeterBlum.DES.SelectedIndexCondition(); cnd2.Index =...

Generating a literal for each item in an item collection

As it stands right now, I have a literal control on my page. In my code-behind, I'm using StringBuilder to generate some JavaScript. Also on that page I have a item collection. What I want to do is for each item in my item collection, generate my literal which will in essence generate my JavaScript. Here is an example of my code-behind n...

asp.net profiles

I have this page called profile. The time is wrong when I run the application. Can someone help me correct the time to the right format? <asp:LoginView ID="LoginView1" runat="server"> <AnonymousTemplate> <strong>To View Profiles You Have to Register Or </strong> <asp:HyperLink ID="HyperLink1" runat="server" ...

Display the required value in the dropdown on the pageload

I am trying to extract month and year from database and show it as selected in the dropdown. Ex: Month and year, consider 2 and 2013. I want the dropdown expmonth to show Febraury and expyear as 2013 when the page is loaded. When i tried the below code, it did not show me 2 and 2013 instead showed Jan and 2010 which is default. Where do ...

Is it possible to make ASP.NET WebMethod CacheDuration configurable?

I'm using the following attribute on a web method in a web service: [WebMethod(CacheDuration = 60)] Is it possible to make the CacheDuration value of 60 configurable from a web.config setting? Or is there another was to set CacheDuration not using an attribute? ...

Console App Host ASPX Page?

In Framework 4.0 I have a little console app. I have a self-contained .aspx page (no codebehind) and would like to run the console app just to host this page. I searched around for tricks with System.ServiceModel.Web or System.Web.Services trying to find a way to do this. Can anyone help me get clue? Thanks. ...

How to best fix an InProc session state variable \ multi instance problem?

I've recently been tasked with fixing a rather nasty bug resulting from the misuse of session state. We have an asp.net web application that runs on a single sever using inproc session state. The basic design is that a typed dataset is loaded from the database and stored in session state using a common session variable name like Session...

ASHX C# for each loop on POST vars

Hello. I have the following piece of code on C#, on an ASHX or Generic Handler file: public override void ProcessRequest(HttpContext contexto) { string destino = contexto.Request["destino"]; string variables = "?"; string valor = ""; foreach (string nombre in contexto.Request.QueryString) { if (nombre == ...

Is it possible to call a webservice via a link?

Hi, I have a webservice I need to call via a link. The webservice returns a pdf document and takes a document Id as a input parameter. Under normal circumstances I could have the link call some code in the code behind which in turn calls the webservice. However the difficult part about it is I can't add code to the code behind. The rea...

how to work with videos in ASP.NET?

Hi, this is my first time doing a gallery of videos using ASP.NET, I believe there are many articles on the net regarding this, but I would like to see some recommendation and different point of view : what are the tools used? how to not allow user to download a video? what the difference between vimeo,dimecasts.net choice , what abou...

How can I use a mock control in a Web project, and have the compiler not complain about it?

We have a couple mini-applications (single Web form look-up stuff) that need to run in the context of a much larger site and application (hereafter "the Monolith") We don't want to install the Monolith on every developer's machine, so we want some developers to be able to develop these little apps in their own isolated sandbox project (...

any standard approach for updating 50 asp.net web applications + database?

I am using VS 2k10 and have a asp.net 4 app with a sql server db behind it, and I have 50 deployments of it (50- databases, 50 web application deployments). Is there any recommended or standard tool in the industry used for updating mass web applications and databases all at once? ...

Hints and tips for a Windows service I am creating in C# and Quartz.NET

Hi all, I have a project ongoing at the moment which is create a Windows Service that essentially moves files around multiple paths. A job may be to, every 60 seconds, get all files matching a regular expression from an FTP server and transfer them to a Network Path, and so on. These jobs are stored in an SQL database. Currently, the se...

ITextSharp insert text to an existing pdf

The title sums it all. I want to add a text to an existing PDF file using iTextSharp, however i can't find how to do it anywhere in the web... PS: I cannot use PDF forms. Thanks in advance ...

Does SoapHttpClientProtocol.BeginInvoke hold a thread?

Does SoapHttpClientProtocol.BeginInvoke hold onto a worker thread while waiting for i/o? ...

Best way to control page titles on a large website in ASP.NET

We have a fairly large website with several master pages. Right now the titles are being controlled by Session variables in individual pages and set by the master page. The code is bad and needs to be redone. With the current system, since the master page is executed last, we can't completely overwrite the page title when needed from ...

headless browser for ASP.NET

I am developing full ajax web app. So I need to develop google crawlable app, also I must create snapshot for googlebot. Do you know headless browser works with javascript and ajax for ASP.NET ? I found XBrowser but right now it hasn't JavaScript support. sorry for my English :). ...