Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can a button call a vb function onclick

Status
Not open for further replies.

zma

Programmer
May 30, 2006
25
US
I have form tags in a master page. In some place holders I have aspx files which have textboxes, dropdowns, and buttons and everything works-like they inherit the form tags from the master page.

In ascx files, buttons do not seem to inherit the master page form tags-I get an error saying the button type needs to be inside form tags. If I put the tags there, I get an error saying there are 2 many form tags.

There is another button type the Expression Web menu called advanced button.

<button id="button1" text="button" onclick="testsub">
button
</button>

By clicking this button, instead of running testsub, I get an error in a gray box saying "testsub not defined". It will run a javasccript function fine though.

Is there a way I can get button1 to run a vb function?
 
Post your code - the buttons in the ACSX should run (if dropped inbetween the form tag on your Master.)

Thanks:)
 
Thank you for writing back Tperri. The problem seems gone now-the ascx is loading with no error and the asp:button is running simple vb functions when clicked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top