Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 16th, 2005, 02:24 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default PropertyGrid - Internet Explorer hosting problem

Hi,

I have created a Windows UserControl. This Control hosts a PropertyGrid and a Button

control. The UserControl
project also includes a class called "TestClass" and a custom TypeConvertor class called

"DDConv".

When the user clicks on the Button control, the application assigns an instance of

"TestClass" to the PropertyGrid.

The "TestClass" has a property called "CustProp" and it has an TypeConverter attribute

assigned to
the "CustProp" property. The TypeConvertor points to the "DDConv" class.

The PropertyGrid in the UserControl displays a DropDown against the "CustProp" property when

the UserControl is
hosted in a windows application.

When the UserControl is hosted in Internet Explorer, the PropertyGrid does NOT SHOW any

DropDown for the "CustProp"
property.

NOTE: I test the UserControl in Internet Explorer from a virtual directory on my machine. I

have set "FullTrust" for
the "LocalIntranet_Zone" on my machine.

I want the PropertyGrid to display the DropDown in Internet Explorer - can someone help me

in figuring out how to
acheive the same?

'TestClass.vb
Public Class TestClass
    Dim _name As String
    Dim _ddProp As String

    Public Property Name() As String
        Get
            Return _name
        End Get
        Set(ByVal Value As String)
            _name = Value
        End Set
    End Property

    <System.ComponentModel.TypeConverter(GetType(DDCon v))> _
    Public Property CustProp() As String
        Get
            Return _ddProp
        End Get
        Set(ByVal Value As String)
            _ddProp = Value
        End Set
    End Property

End Class

'DDConv.vb
Public Class DDConv
    Inherits System.ComponentModel.StringConverter

    Dim _values As String()
    Dim _restrictToList As Boolean

    Public Sub New()
        _values = New String() {"Yes", "No"}
    End Sub

    Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As _
        System.ComponentModel.ITypeDescriptorContext) As Boolean

        Return True
    End Function

    Public Overloads Overrides Function GetStandardValues(ByVal context As

System.ComponentModel.ITypeDescriptorContext) _
        As System.ComponentModel.TypeConverter.StandardValues Collection

        Return New StandardValuesCollection(_values)

    End Function

    Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As _
        System.ComponentModel.ITypeDescriptorContext) As Boolean

        Return _restrictToList
    End Function
End Class


Thanks & Regards,
Dhwanil Shah
dhwanil.shah@patni.com

Reply With Quote
  #2 (permalink)  
Old March 18th, 2005, 03:20 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I "discovered" what was wrong with this - somehow IE was "looking" for the dll which had the TypeConverter - even when that was the DLL which exposed the UserControl that IE was hosting.

When the PropertyGrid tried to use a custom type converter - it tried to create an instance of a class from its fully qualified assembly name. While trying to create this instance, IE (or .NET Framework or PropertyGrid) tried to download the required DLL (again). IIS on the server kept on returning 401 (for whatever reason). That was the reason the TypeConverters were not working. I discovered all this by monitoring the requests and responses between IE and IIS (I used the Fiddler tool from Microsoft - available at http://www.fiddlertool.com)

While trying to resolve another problem in the application - I read Paul Wilsons blog at http://weblogs.asp.net/pwilson/archi...5/30/8037.aspx. In that Tim Clamp gave refrence regarding how to make IE / .NET Framework understand how to locate and download the assemblies. Based on that, I was able to give IE / .NET Framework absolute location for the .DLL that was being hosted by IE.

Refrences -

1. WinForm UserControls in Internet Explorer
http://weblogs.asp.net/pwilson/archi...5/30/8037.aspx

2. PRB: Runtime Probe Causes a Delay When You Load a Windows Forms Control in Internet Explorer
http://support.microsoft.com/default...b;en-us;814668

Regards,
Dhwanil Shah

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Internet explorer viruthachalams C# 1 July 18th, 2007 09:06 AM
image cache problem in Internet Explorer richard.york PHP How-To 16 June 10th, 2006 03:32 AM
Internet Explorer cannot open the internet site cathiec ASP.NET 2.0 Basics 1 October 22nd, 2005 01:30 PM
Internet Explorer JelfMaria VB How-To 10 April 27th, 2005 03:58 PM
Problem in running applets in Internet Explorer sharadagarwal BOOK: Beginning Java 2 1 June 12th, 2004 08:13 AM



All times are GMT -4. The time now is 06:45 AM.


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