Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to raise event of ITemplate using vb.net, Pls use follwing code

How to raise event of ITemplate using vb.net, Pls use follwing code

Scheduled Pinned Locked Moved Visual Basic
helpcsharpdatabaseasp-net
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BalasahebK
    wrote on last edited by
    #1

    Hello Everybody, I need help from all of u, pls help me for following code. I have given number for each line, only for ref. When u copy the code, pls remove the numbers given and do modification. The original code is in C# that converted into VB.net using converter.This code is perfectly working in C# without any error and waring Now I'm facing problem. Now problem is, the line number 20 need raiseEvent, I don't know how to raise event in vb.net Pls concentrate on line 20. Pls let me know how to declare and raise event. 1 Public Class CreateItemTemplateRadioButton 2 Implements ITemplate 3 Dim strText As String 4 Dim strRadioButtonName As String 5 Dim Visibility As Boolean = True 6 Dim blChecked As Boolean = False 7 Public Sub New(ByVal RadioButtonName As String, ByVal Text As String, ByVal AutoCheck As Boolean) 8 Me.strText = Text 9 Me.strRadioButtonName = RadioButtonName 10 Me.blChecked = AutoCheck 11 End Sub 12 Public Sub New(ByVal RadioButtonName As String, ByVal Text As String, ByVal AutoCheck As Boolean, ByVal Visibility As Boolean) 13 Me.strText = Text 14 Me.strRadioButtonName = RadioButtonName 15 Me.Visibility = Visibility 16 Me.blChecked = AutoCheck 17 End Sub 18 Public Sub InstantiateIn(ByVal objcontainer As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn 19 Dim rad As HtmlInputRadioButton = New HtmlInputRadioButton 20 rad.DataBinding += New EventHandler(rad_DataBinding) 21 objContainer.Controls.Add(rad) 22 End Sub 23 Private Sub rad_DataBinding(ByVal sender As Object, ByVal e As EventArgs) 24 Dim rad As HtmlInputRadioButton = CType(sender, HtmlInputRadioButton) 25 rad.Value = strText 26 rad.Checked = blChecked 27 rad.Visible = Visibility 28 End Sub 29 End Class Balasaheb Software Developer Platform: Asp.net,vb.net Database: SQL Server 2000

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups