I make a simple Visual web part and deployed it, and put it on a page.
I have a button included in the web part, I want to output some text, like Hello World, output somewhere in SharePoint, so I can do some code tracing when I need to.
I assume there is a method for the button, that is called when I click it?
It is there that I want to put some code to output text.
How is this done in C# code in a web part in SharePoint 2010?
I make a simple Visual web part and deployed it, and put it on
Share
You can create an event handler for your button by double-clicking it. To display some text in a webpart, just add a label and set its text property.
Of course, you could also just use the debugger in Visual Studio if you want to debug something. 😉