I have a LiteralText which changes data when i click my control. I read up some guides and if I update the LiteralText within the UpdatePanel, it should only do a partial update but it updates the entire page.
I also read up another guide which says changing my __doPostBack to the clientID but didn't work too.
So here is my aspx side code:
<div id="modalbox" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
<ContentTemplate>
//Some Codes
<asp:Literal ID="modalTitle" runat="server"></asp:Literal>
//More Codes
</ContentTemplate>
</asp:UpdatePanel>
My doPostBack code:
<script type="text/javascript">
function changeModalTitle(eventTarget, parameter) {
__doPostBack('<%=modalboxStaff.ClientID%>;', parameter)
}
</script>
And the code that calls both codes:
<a href='#modalbox' data-toggle='modal' runat="server" id="modalboxStaff" **onclick="javascript:changeModalTitle('AddStaff', 'Sup World')**">