This is a migrated thread and some comments may be shown as answers.

How to Convert C# Code to VB code in the ASPX demos files

2 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
R2
Top achievements
Rank 1
R2 asked on 13 Jan 2009, 10:30 PM
Hello,

I've noticed that in several of the demos, i.e.: http://demos.telerik.com/aspnet-ajax/ComboBox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx the ASPX page is using a default.cs file.  Even though you provide the VB code, can you use it with a default.cs file?  I've noticed that Telerik staff also will list the .C# code, not usually the VB code.

If not, could you tell me how to make the default.aspx page useful for VB?  Should I revise the highlighted yellow text of Line 6 in the ASPX page as follows:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %> 
<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %> 
<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %> 
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %> 
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.ComboboxExamplesCS.MultipleComboBoxes.DefaultCS" Language="c#" %> 

Line 6: (revision in bold text)

<% Page AutoEventWireup="true" CodeFile="DefaultVB.aspx.VB" 
Inherits="Telerik.ComboboxExamplesVB.MultipleComboBoxes.DefaultVB" Language="vb" %>


Is this correct?  I would Add a New Web Form (not use the VB default page), name it and copy & paste the .aspx code it into the new VB web form.  That way the code behind file would be created correctly without my trying to revise that.  (I've run into problems in the past trying to change the "CodeFile" and "Inherits" keywords or rename the default page).


Sincerely,
R2

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 14 Jan 2009, 08:42 AM
Hello R2,

Actually all of our online demos have a DefaultVB.aspx file, so you don't have to make changes to the DefaultCS.aspx. For example:

http://demos.telerik.com/aspnet-ajax/ComboBox/Examples/Functionality/MultipleComboBoxes/DefaultVB.aspx

http://demos.telerik.com/aspnet-ajax/ComboBox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx

There is a language switch above every example (on the right side), that allows you to switch the ASPX language from C# to VB and vice-versa.


Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
R2
Top achievements
Rank 1
answered on 14 Jan 2009, 02:17 PM
Cool!  Thanks Dimo!
Tags
Grid
Asked by
R2
Top achievements
Rank 1
Answers by
Dimo
Telerik team
R2
Top achievements
Rank 1
Share this question
or