Hi All, I have been stuck with this problem for a long time and have not found any solution. suppose I have a page called a.aspx.vb and a class file called B.vb. in a.aspx.vb I create a new instance of B:
protected sub page_load()
dim cls as new B
dim lit as new literal
lit = b.createbutton
end sub
then say inside the B.vb I have:
protected function createbutton() as literal
dim lit as new literal
dim butt as new Button()
'this is where my problem is
addhandler butt.click, addressof method
lit.controls.add(butt)
return lit
end function
I want my code to do something on click. like...assign some value to some variables on a.aspx. say again in the a.aspx I want something like:
sub method
'on button click
dim something as string
something = "the button has been clicked"
end sub
But obviously it won't work just like that. so how do I do that??? I hope this explains what I need. Thanks for helping in advance.