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. Sharepoint WebPart Button Click

Sharepoint WebPart Button Click

Scheduled Pinned Locked Moved ASP.NET
sharepointdebugginghelpquestionlearning
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.
  • D Offline
    D Offline
    Daaron
    wrote on last edited by
    #1

    I have an *extremely* basic question. Much of the code below has been lifted from Scott Hilier's book on MOSS. I have also asked him this question with no response as yet. When I click on a button in a sharepoint web part, I think it should run the method I associate: protected override void CreateChildControls() { m_button = new Button(); m_button.Text = "Push Me!"; m_button.Click += new EventHandler(m_button_Click); Controls.Add(m_button); } protected override void RenderContents(HtmlTextWriter writer) { m_button.RenderControl(writer); } void m_button_Click(object sender, EventArgs e) { m_report += "Button Click
    "; } ...The problem is that "Button Click" is never reached. It does post back, but it does not reach my breakpoint and does not write the text. Ideas appreciated.

    Cheers, Daaron

    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