asp.net

Problems with ASP.net JSON Webservice response type

I am attempting to write an ASP.net web service that will be utilized by a jQuery AJAX call. I am absolutely at my wit's end trying to get this to work. I've seen a number of similar questions online but I haven't been able to find a solution that fits. When I attempt to make the ajax call (via jquery) I get a successful response from t...

FileUpload is not working within update panel

So what I am trying to do is, have a user select a file to upload. Since I am only going to accept images, I will test the extension. I also want to limit the file size to under 2mb, so I will test that(haven't implemented in code yet). If the file they have selected passes, then I want the label to say "File Accepted", and store the ...

How can i add checkbox in listbox(asp.net)?

How can i add Checkbox in listbox. i want to make it in asp.net . ...

How do I know if a regular for is a postback in ASP.ENT (was Why is IsPostback not set in ASP.NET plain forms)

I am using ASP.NET to process plain forms, posting back to myself. (I dont want to use ASP.NET forms, with runat="server ) To IsPostBack is not set when it really has to be a postback. What is the reason for this? Should I not post back to myself? <form method="post" id="theForm" action="http://localhost/index.aspx"&gt; <input type...

Asp.Net Validaterequest False

I'm creating an Asp.Net program UI where users can browse and change information in a database. For this reason, they need to be able to use all forms of chars, but I still need to keep the program HTML and SQL itself secure. For that reason, I'm using a self-built method that replaces dangerous chars such as '<' etc with their html-code...

IIS 6 with wildcard mapping and UNC virtual directory problem

Hi. On our production servers (win 2003 with IIS6 and load balanced with an F5 BIGIP), we have a problem when introducing wildcardmapping on IIS6. We use .net Framework 3.5 SP1. The issue manifests itself as by the server only sometimes serving the images stored on a virtual directory pointing to a UNC path. Sometimes the images are di...

What’s the best way to import an Excel-file to SQL Server on a 64 bit Windows platform in ASP.NET?

What's the best/smoothest solution to import an Excel-file to SQL Server, on a 64 bit Windows system? What I'm specifically after is to import an Excel 97-2003 file, to a SQL 2005 database, from an ASP.NET/C# page. The import data will demand users to use a "template", so the data looks the same every time. Previously the system has us...

Text Format Toolbar

I am looking for how to implement a toolbar similar to the one used here when you add a new question, this toolbar should format the text entered in my text box and allow me to make it Bold, Italic, choose size and fond and highlights, colors as well... One important thing, I want one that is both supported on firefox and IE, discountasp...

How can I send data or event info from Javascript to Default.cs (Asp.net)?

How can I send data or event info from Javascript to Default.cs (ASP.NET)? is it ajax? ...

Should I store my images in the database or folders?

Possible Duplicate: Storing Images in DB - Yea or Nay? Hi At the moment each Company on my website have 1 picture they can add to their profile. I save that image into the database....its their Company Logo. Now i want to allow them to add more pictures. Now i don’t know if i must save it all in the database or save it in fo...

Opening the webpage as if a link has been clicked from webpage

There is a webpage at this URL: http://www.vankampen.com/Products/529Portfolios This webpage opens with default option "With Sales Charge". There is a link "Without Sales Charge" on this webpage. When we click on this link then webpage displays options related with "Without Sales Charge". I want to open the "http://www.vankampen.com/P...

Paging Problems With Standard .net 2.0 Gridview using VB.Net

I am using a standart .net 2.0 Gridview which uses an XMLDatasource to populate the Grid. The Data property of the XMLDatasource is set dynamically which allows the gridview to change based on input. All this works fine however I am having problems with paging... I have set the AllowPaging Property to "true" and set the PageSize Proper...

How do you create folders and specify access permissions on them at the same time?

I have a windows forms application which serves as a sort of administrative module for an ASP.NET web application. The web application serves multiple countries, and folders are created when new countries are added to the application data. Unfortunately on the newly added countries I run into an exception with the web application when I...

ASP.NET - Converting localized number

I have a textbox accepting user input; I am trying to use this user input it to populate this member of one of my business objects: public System.Decimal? ExchangeRate The application is localized - I need to support at the same time cultures that accept these as valid inputs: "1,5" and "1.5" The code I have now is: var culture = Th...

IE sending POST instead of GET with $.get

Hi I have little problem. I can't use AcceptVerb.Get on some ASP.NET MVC actions because when I use $.get(..) IE sends POST instead of GET. Why??? Please help :) edit: Forget to add that Firefox work as I want - the same code in Firefox performs GET. ...

ASP.NET App - Set IE7-Compatibility Mode?

What is the simpliest way to set the IE7-Compatibility Mode mode in an ASP.NET application to deal with IE8 issues? Is it possible to set this via the web.config or must it either be set at the IIS or page level? ...

AJAX and asp.net security question

Hello. I have a couple of questions regarding security mechanisms in asp.net (2.0). I have always been using Forms authentication + Page.User for validating permissions. Now I need to send some data from client side javaScript (jQuery) to a WCF service. Will my IPrincipal be still accessible from HttpContext of WCF service (I'm hosti...

How can I identify whether an ASP.NET site is being run "normally" or in "debug" via Visual Studio?

How can I determine what 'mode' my site is running under? In this specific case, I have code in the code-behind pages that should act one way in 'release' mode - that is someone navigating there with a browser, and another way if I'm in debug mode coming from VS2008. (These are things like identifying which SQL connect string to use, w...

Selective Validation

I have a form that have many text fields and all are being validated, I also added the NiceEdit plugin to be able to format text in my text areas, but it is raising errors like: A potentially dangerous Request.Form value was detected from the client Now I can simply go to the top of the page and in the page directive add ValidateReques...

GridView with ITemplate fields export to Excel

I have a GridView wich has some programmatically Template fields added to it on Page_Load and on every PostBack (because, for some reason, these fields loose their value on PostBack). It worked fine, so I didn't thought anymore about the PostBack issue. Now I'm trying to export that GridView to Excel. I'm using the following code: pro...