dialm4monkey
May 18th, 2005, 03:17 PM
Hi All -
I have a simple webform that caches a dataset until the user is finished editing all records then posts the changes back to the database.
I have 1 link button "btnHoldChanges" that holds changes to a dataset that is held in session. the server side OnClick handles updating the dataset. but I a want client onClick for an "Are You Sure?" the HTML for my link button looks like ... <asp:linkbutton id="btnHoldChanges" style="Z-INDEX: 111; LEFT: 8px; POSITION: absolute; TOP: 656px" onclick="return confirm('are you sure?')" runat="server">Hold Changes</asp:linkbutton> (hope that doesn't render)
as you can probably tell from this, I get an error. "return" is not a member of the page. that I can understand. so how do I get both server and client side script on a server control?
am I trying to have my Cake and eat it too?
I have a simple webform that caches a dataset until the user is finished editing all records then posts the changes back to the database.
I have 1 link button "btnHoldChanges" that holds changes to a dataset that is held in session. the server side OnClick handles updating the dataset. but I a want client onClick for an "Are You Sure?" the HTML for my link button looks like ... <asp:linkbutton id="btnHoldChanges" style="Z-INDEX: 111; LEFT: 8px; POSITION: absolute; TOP: 656px" onclick="return confirm('are you sure?')" runat="server">Hold Changes</asp:linkbutton> (hope that doesn't render)
as you can probably tell from this, I get an error. "return" is not a member of the page. that I can understand. so how do I get both server and client side script on a server control?
am I trying to have my Cake and eat it too?