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. Web Development
  3. ASP.NET
  4. protected function

protected function

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
6 Posts 4 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.
  • M Offline
    M Offline
    monika_vasvani
    wrote on last edited by
    #1

    Hi ALl I have one runtime checkbox. I have created one protected function for checkbox. But how to call this function on checkbox? Thanks monika

    I 1 Reply Last reply
    0
    • M monika_vasvani

      Hi ALl I have one runtime checkbox. I have created one protected function for checkbox. But how to call this function on checkbox? Thanks monika

      I Offline
      I Offline
      InsDev
      wrote on last edited by
      #2

      just make clear what u want to do. Dev

      M 1 Reply Last reply
      0
      • I InsDev

        just make clear what u want to do. Dev

        M Offline
        M Offline
        monika_vasvani
        wrote on last edited by
        #3

        Hi I have datagrid which is created at runtime. I add checkboxes in datagrid also at runtime. now i want event when i click on checkbox. i have code like protected void OnChangeHandler(object sender,EventArgs e) { // Handle the event... } dim chk as new checkbox chk.Id="chk" chk.CheckedChanged += new EventHandler(OnChangeHandler); but this code is not working in asp.net with vb.net.I think this code is in c#. How can i write this code in asp.net with vb.net? I hope now u got my question. Thanks monika

        I E 2 Replies Last reply
        0
        • M monika_vasvani

          Hi I have datagrid which is created at runtime. I add checkboxes in datagrid also at runtime. now i want event when i click on checkbox. i have code like protected void OnChangeHandler(object sender,EventArgs e) { // Handle the event... } dim chk as new checkbox chk.Id="chk" chk.CheckedChanged += new EventHandler(OnChangeHandler); but this code is not working in asp.net with vb.net.I think this code is in c#. How can i write this code in asp.net with vb.net? I hope now u got my question. Thanks monika

          I Offline
          I Offline
          indianet
          wrote on last edited by
          #4

          AddHandler chk.CheckedChanged, AddressOf OnChangeHandler public sub OnChangeHandler(object sender,EventArgs e) ... .. .. end sub

          M 1 Reply Last reply
          0
          • M monika_vasvani

            Hi I have datagrid which is created at runtime. I add checkboxes in datagrid also at runtime. now i want event when i click on checkbox. i have code like protected void OnChangeHandler(object sender,EventArgs e) { // Handle the event... } dim chk as new checkbox chk.Id="chk" chk.CheckedChanged += new EventHandler(OnChangeHandler); but this code is not working in asp.net with vb.net.I think this code is in c#. How can i write this code in asp.net with vb.net? I hope now u got my question. Thanks monika

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            You can also check Google for the Microsoft Paste As VB.NET extension.

            1 Reply Last reply
            0
            • I indianet

              AddHandler chk.CheckedChanged, AddressOf OnChangeHandler public sub OnChangeHandler(object sender,EventArgs e) ... .. .. end sub

              M Offline
              M Offline
              monika_vasvani
              wrote on last edited by
              #6

              Hi Thanks for kindly response.I have written as u say but it's not working. I give u code if possible check it. Hi I have one datagrid name as dg_unit on a form. I am adding a new datagrid name as dg_diagnosis at runtime in dg_unit datagrid. I am adding a new checkbox control at runtime in dg_diagnosis grid. i am adding event handler to checkboxes.But event is not fired. I give a code which is written by me. If any correction or missing pls suggest me. For Each ditem In dg_diagnosis.Items Dim str As String = ditem.Cells(1).Text Dim chk As New CheckBox chk.ID = "chk" ditem.Cells(0).Controls.Add(chk) AddHandler chk.CheckedChanged, AddressOf chk_CheckedChanged Next Public Sub chk_CheckedChanged(ByVal sende As Object, ByVal e As System.EventArgs) Response.Write("hi") End Sub Thanks monika

              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