asp.net

Maintain CSS styling when converting HTML to PDF in ASP.NET

Hi, I am using ITextSharp to convert a HTML page to PDF. However, ITextSharp prints the CSS in the STYLE declaration straight out, ignores stylesheets even when added programatically and only listens to some inline styles (e.g. font-size and color but not background-color). Is there something I am missing with ITextSharp, or is there ...

How do you use WatiN to click on an Ajax toolkit TabContainer header?

I have an ajax toolkit TabContainer control on my page with a couple tabs. In my test, I would like to switch between the tabs. I've tried _ie.Span("tabHeaderID").Click(), .MouseDown(), .FireEvent("onclick"). I've tried these same methods on the parent span elements as well. I've also tried Eval-ing some javascript to set the active in...

Unit tests to test the Web methods of a Web service which does some database transactions using NUnit

How do I write unit tests to test the Web methods of a Web service using NUnit? The web methods in this application will add,update and delete a record in the database. The unit test will test a web method whether a record has been inserted in the database, the webmethod calls a method in data access layer to perform this action. ...

Image problem in IE 7

Hi, I am developing a site using asp.net and C# ( framework 1.1 ). Theres a provision for the user to upload his photo and the upload performs in 2 steps 1. User selects a photo and the photo is displayed for review 2. Database call is made and it is uploaded to the server In IE6 the photo is shown in review mode ( from the users syste...

Verify if file exists or not in C#

Hi, I am working on an application. That application should get the resume from the users, so that I need a code to verify whether a file exists or not. I'm using ASP.NET / C#. Thanks, Suresh Kumar ...

Server-Side-Code in aspx file

Hi all, I want to ask in which phase of Control Execution Lifecycle is the "Server-Side-Code written in aspx file" being executed? Is it before SaveState or after, I claim it's in the rendering phase, is it true?? in aspx file if my code writen as "<%" if(true) { rdlistAnswers.Items.Clear(); foreach (string item in myCollection) { ...

How to get data sent with WebClient.UploadData

Hello all, i'm trying to upload some data from an ActiveX control to a webpage. The best way for me to do it is in a byte array through WebClient.UploadData. I'm having some trouble to find how i can retrieve my data on pageload... There are plenty of examples on how to send the data, but i am yet to find one that shows how to get the ...

Adding a License to your .Net Web Application

Hi, I am currently looking at adding some licensy type software which will protect my .net web application source code. Was wondering if you guys had any experience with this and knew perhaps any companies or sources which provide such utilities ? So my main aim is to protect the actual files i.e Default.aspx Default.aspx.cs .... being...

ASP.NET - losing selection of dropdownlist populated via javascript.

I have two ASP.NET dropdownlist controls on a page. The first calls back to the server and obtains an array which is returned to the client and used to populate the second dropdownlist via javascript. However if I make a selection in the second (and newly populated) dropdownlist and then do a postback the selection and contents of the se...

Do Ajax and ASP.NET MasterPages mix?

Has anyone had experience using these two technologies in tandem? What are (if any) the major difficulties in getting the two to cooperate? How would a site using these technologies be different than a normal ASP.NET Web Application with Ajax? Thanks! ...

Anyone experienced with ExpertTree?

If so, is it good when used in anger? I'm considering it for a new project - it ticks a number of specific boxes that I need to implement. FYI http://www.aspnetexpert.com/demos/Tree/default.aspx ...

java webpart like asp.net ?

I was reading asp.net webpart technology which gives users some personalization abilities under some rules and tools of webparts. are there something like webpart technology lib under java ? ...

ASP.NET MVC TDD with LINQ and SQL database

I am trying to start a new MVC project with tests and I thought the best way to go would have 2 databases. 1 for testing against and 1 for when I run the app and use it (also test really as it's not production yet). For the test database I was thinking of putting create table scripts and fill data scripts within the test setup method an...

How to reference a Master Page from a user control?

I'm looking for a way to (preferably) strongly type a master page from a user control which is found in a content page that uses the master page. Sadly, you can't use this in a user control: <%@ MasterType VirtualPath="~/Masters/Whatever.master" %> I'm trying to access a property of the master page from the user control and would rat...

Component reuse between ASP.NET and C#.NET

This might seem like a ridiculous question since I'm quite inexperienced in .NET. Is it possible to build components in C#, using .NET, which can be reused in ASP.NET. For example if one would like to port an application onto the web. If possible, how portable are they? I.e. can GUI be reused in some extent? Is there an intermediate fo...

ASP.NET - how to stop unrequired server validation

I have used ValidatorEnable to disable a RequiredFieldValidator in javascript. However on postback the control being validated by the validator is still validated ... even though I disabled the validator on the client. I understand why this is happening since I've only disabled the client validation ... however is there a nice way to de...

Max File Extension Length

Is there a maximum lengh for a file extension? The longest one I've seen is .compiled (8 chars) Useless Background I'm creating a IHttpHandler to return image icons for a specific filename. I'm simply calling a FileImage.axd?ext=pptx. I'm generating the files on the fly using SHGetFileInfo similar to my post for WPF, then caching th...

.NET force COM objects release

Hi ! I have an ASP.NET 2.0 application under IIS that has the functionnality of exporting some data to a software called HFM (Oracle Hyperion Financial Management). To perform that export, the .net application uses an API based on COM objects provided by the HFM client (the client is installed on the same machine that the server, etc.)...

Trigger an update of the UpdatePanel by a control that is in different ContentPlaceHolder.

I have a page with two ContentPlaceHolders. One has a DropDown and another UpdatePanel with content. How can I trigger update to the UpdatePanel by the DropDown's selectedItemChanged event when they are in different ContentPlaceholders? The following would not work since UpdatePanel1 doesn't know about DropDown1: <asp:UpdatePanel ID...

Configuring 'Cassini' (ASP.NET Development server) for CAC cards for testing - How?

I'm developing a new website (ASP.Net, VB codebehind pages, .Net 3.5) to replace a "Classic ASP" site. Some of the pages are 'public' and the rest require authentication - in this case it's done by reading DoD-issued CAC cards through the keyboard. Now, for 'production', they configure IIS so that it does the authentication challenge (...