HtmlForm control question for ASP.NET 1.1, SharePoint related

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mwalts
    New Member
    • May 2007
    • 38

    HtmlForm control question for ASP.NET 1.1, SharePoint related

    Hello all,

    I have to write a web part for a SharePoint 2003 server. We only have one SharePoint server, so developing directly on it isn't really viable. So I've planned to do the majority of the debugging using plain old ASP.NET 1.1 on a local machine.

    The problem I'm running into is that web parts have a form behind the scenes and you can just add your controls to the pages (parts) Controls collection. Normal Pages do not. Also, (SharePoint) web parts force you to generate all the HTML through code using the RenderPart method. As I'm trying to keep things similar, I'm only using the Render method. Trying to add the server form through code properly hasn't been working for me.

    I figured I'd just be able to do a two line comment swap to switch from the forms control to the pages Controls collection when I wanted to, but I can't seem to get it's runat attribute = to server in code. MSDN helpfully doesn't include a members list for the HtmlForm class for framework 1.1 (at least not that I found) and all examples just involve the <form blah> which I can't use.

    Does anyone know how to do this?

    I think I might be able to find a way around by keeping the <form > thing and doing a find control to get it... but that is even uglier and I don't see why I can't just set the runat attribute in code.

    Thanks in advance,

    -mwalts
  • mwalts
    New Member
    • May 2007
    • 38

    #2
    Looks like I was wrong about what the problem was.. seems my event code for my DropDownList is just wrong... or something. It's set to auto post back but the selection changed event isn't firing. That sounds like something that I can look up though.

    Thanks anyway everyone :-)

    -mwalts

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Thanks for sharing the problem :).

      Comment

      Working...