In short I want a call a function jAlert() from jquery.alert.js file in a .aspx.vb page..
More details below
“When I click on “update page” the control goes to ”ActionRepeaterItemBound” on code behind and then to my action.js page and this way I am able to add attributes and use them while calling my jscript function. However when I click on “Submit Update”, the control first goes to action.js and then to “ProcessAction” on code behind. So I am not sure how I need to add attributes before the control goes into action.js.”
I have a file jquery.alert.js which have functions like jAlert().
I have a file .aspx with part of code as below
<asp:Repeater runat="server" ID="currentActionRepeater" OnItemDataBound="ActionRepeaterItemBound" OnItemCommand="ProcessAction">
<ItemTemplate>
<asp:LinkButton ID="CurrentActionCommit" runat="server" CssClass="action_method_commit" CommandName='<% #Eval("MapName").ToString() + ":" + Eval("ActionName").ToString() + ":Commit"%>' CommandArgument='<%# GetActionFolderId(Eval("FolderID")) %>' Text="Submit"/>
<asp:LinkButton ID="CurrentActionCancel" runat="server" CssClass="action_method_cancel" CommandName='<% #Eval("MapName").ToString() + ":" + Eval("ActionName").ToString() + ":Cancel"%>' CommandArgument='<%# GetActionFolderId(Eval("FolderID")) %>' Text="Cancel"/>
</ItemTemplate>
</asp:Repeater>
My aspx.vb page has a function as below where attributes are added to control and are used in a page action.js to call the jAlert function
Protected Sub ActionRepeaterItemBound(ByVal Sender As Object, ByVal e As RepeaterItemEventArgs)
I want a similar logic to be performed on my LinkButton “CurrentActionCommit”. How can I do this?
Im not sure if this is what you are looking for but in your repeater databound event you can attach an onclick event to the button.
First find the button in the repeater and then add the onclick event
Hope this helps