----- Original Message ----- 
From: "bubberz" <[EMAIL PROTECTED]>
To: "Ajax.NET Professional" <[email protected]>
Sent: Monday, July 10, 2006 6:43 AM
Subject: [ajaxpro] Code to VB from C


In Visual Basic you use the GetType command...

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        AjaxPro.Utility.RegisterTypeForAjax(GetType(AjaxVB.WebForm1))
    End Sub

There is a Visual Basic sample application on my website at 
http://josephguadagno.net/ajax.aspx

Joseph Guadagno
http://josephguadagno.net
>
> hello!
> I'm using the AjaxPro.dll and also have the Wrox Professional AJAX
> book, and am trying to convert the following to VB.  My .aspx page is
> called Ajax1.aspx
>
> public class Ajax1 : System.Web.UI.Page
> {
>  private void Page_Load(...)
>   {
>   Ajax.Utility.RegisterTypeForAjax(typeof(Ajax1));
>   }
> }
>
> If I use the following in my VB Page Load:
> AjaxPro.Utility.RegisterTypeForAjax(typeof(Ajax1))
>
> ...I get the typeof() parameter underlined saying "Ajax1 is a type, and
> cannot be used in this expression"
>
> If I use:
>  AjaxPro.Utility.RegisterTypeForAjax(Ajax1)
> ....I get the same error for the parameter.
>
> My web.config is:
> <httpHandlers>
>  <add verb="POST,GET" path="ajaxpro/*.ashx"
>   type="AjaxPro.AjaxHandlerFactory, AjaxPro" />
> </httpHandlers>
>
>
> > 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to