Maybe I'm going about this the wrong way so please feel free to offer a better choice instead of solution...
I need a custom toolbar on several pages. The toolbar will have the same functionality on every page but handle data specific to that page. i.e. btnSave on person.aspx will need to verify name is populated and then issue query to save to person table. btnSave when on the product page will verify it's items then save to the product table.
I didn't want to have to build the same toolbar on every page so I built the web user control. I thought I could put something like Private Sub btnSave_onclick() on every page and that would handle it's own custom checking and procedures.
My problem is webform1.aspx cannot recognize btnSave or even the user control in code view (it will display the user control in the browser though). I tried a work around by placing Public Sub SaveNow() on the aspx and then usercontrol.ascx added
private sub btnSave_onclick()
call SaveNow()
end sub
but then the error is SaveNow is not declared.
As a final note, I got the usercontrol onto the web page by dragging it from the Solution Explorer onto the page (which resulted in it adding
<uc1:tb id="Tb1" runat="server"></uc1:tb>
to the page)
thnx!
-xeno
I need a custom toolbar on several pages. The toolbar will have the same functionality on every page but handle data specific to that page. i.e. btnSave on person.aspx will need to verify name is populated and then issue query to save to person table. btnSave when on the product page will verify it's items then save to the product table.
I didn't want to have to build the same toolbar on every page so I built the web user control. I thought I could put something like Private Sub btnSave_onclick() on every page and that would handle it's own custom checking and procedures.
My problem is webform1.aspx cannot recognize btnSave or even the user control in code view (it will display the user control in the browser though). I tried a work around by placing Public Sub SaveNow() on the aspx and then usercontrol.ascx added
private sub btnSave_onclick()
call SaveNow()
end sub
but then the error is SaveNow is not declared.
As a final note, I got the usercontrol onto the web page by dragging it from the Solution Explorer onto the page (which resulted in it adding
<uc1:tb id="Tb1" runat="server"></uc1:tb>
to the page)
thnx!
-xeno