Go Back   CP Web Hosting - reseller hosting > Server Scripting > .NET
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2007, 12:51 AM
1R1 1R1 is offline
Senior Member
 
Join Date: Mar 2007
Posts: 164
Default Conveting from C# to VB.NET

i am getting problem in converting a piece of code to VB.NET plz give any suggestion if possible
Code:
public partial class ViewCustomers : Page,IViewCustomerView
{
private ViewCustomerPresenter presenter;

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
presenter = new ViewCustomerPresenter(this);
this.customerDropDownList.SelectedIndexChanged += delegate
{
presenter.DisplayCustomerDetails();
};
}

}

give me help!!!!!!!!!1
Reply With Quote
  #2 (permalink)  
Old 07-15-2007, 12:53 AM
Senior Member
 
Join Date: May 2007
Posts: 151
Default Conversion to VB.NET

Hi of the members facined this problem of converting try the below code hope this will be helpful to you:

Private presenter As New ViewCustomerPresenter(Me)

Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
presenter = New ViewCustomerPresenter(Me)
AddHandler DropDownList1.SelectedIndexChanged, AddressOf DDLSelectedIndexChangedHandler
End Sub

Protected Sub DDLSelectedIndexChangedHandler(ByVal sender As Object, ByVal e As System.EventArgs)
presenter.DisplayCustomerDetails()
End Sub
Reply With Quote
Reply


Thread Tools
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

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



All times are GMT. The time now is 07:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0