Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2010, 09:18 PM
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML Object error

Hi all,

I have the below code that works with VS 2008 C#. What is the syntax for VB? I have tryed everything I know to get this to work and OMG what a pain. Please someone help me

<object width="0px" height="0px" classid='<%= (PrintPdfPath != null) ? "clsid:CA8A9780-280D-11CF-A24D-444553540000" : string.Empty %>' onreadystatechange="if(this.readyState==4){this.pr intWithDialog()}">
<param name="src" value="<%= PrintPdfPath %>" />
<embed src="<%= PrintPdfPath %>" width="0px" height="0px"></embed>
</object>
 
Old March 17th, 2010, 05:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I think what you're looking for is IIF: http://msdn.microsoft.com/en-us/libr...0d(VS.71).aspx

classid='<%= IIF (String.IsNullOrEmpty(PrintPdfPath), String.Empty, "clsid:CA8A9780-280D-11CF-A24D-444553540000") %>'

(Untested, but I hope you get the idea)

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to take tooltip object in HTML pushpa ASP.NET 1.0 and 1.1 Basics 6 May 11th, 2007 05:37 PM
converting .NET error object in VB error object webnet .NET Web Services 0 February 5th, 2007 06:02 AM
HTML Object in VB ivan603 VB How-To 0 March 6th, 2006 06:44 AM
Getting HTML from IWebBrowserApp object? Ron Howerton Pro VB 6 1 July 14th, 2005 01:34 PM
Error Occurred creating Report Object: Object does sa_moizatyahoo Classic ASP Professional 0 February 1st, 2005 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.