I have a link button and a button on the same page
When I click the link button I have to redirect it to a different page. When I click the button I have to open a new window..
For the button I am using OnClientClick
For the linkButton I am using on Click
Here is the code for both of them
<script type="text/javascript">
function ShowCostForm(contractCostId)
{
window.radopen('ContractCostEdit.aspx?ContractId=<%# oContract.ContractId %>&ContractCostId=' + contractCostId, 'CostEditWindow');
return false;
}
</script>
<asp:Button ID="btnAddCost" runat="server" Text="Add Cost" OnClientClick="return ShowCostForm();"/>
For the Button
<asp:LinkButton ID="VName" runat="server" OnClick="VName_Click">VendorName</asp:LinkButton></td>
When I click on the linkbutton it goes to ShowCostForm Method. I guess its because of OnClientClick of the button control. I am trying to use only OnClick in the button and it shows an error.
Is there a way to do this?
When I click the link button I have to redirect it to a different page. When I click the button I have to open a new window..
For the button I am using OnClientClick
For the linkButton I am using on Click
Here is the code for both of them
<script type="text/javascript">
function ShowCostForm(contractCostId)
{
window.radopen('ContractCostEdit.aspx?ContractId=<%# oContract.ContractId %>&ContractCostId=' + contractCostId, 'CostEditWindow');
return false;
}
</script>
<asp:Button ID="btnAddCost" runat="server" Text="Add Cost" OnClientClick="return ShowCostForm();"/>
For the Button
<asp:LinkButton ID="VName" runat="server" OnClick="VName_Click">VendorName</asp:LinkButton></td>
When I click on the linkbutton it goes to ShowCostForm Method. I guess its because of OnClientClick of the button control. I am trying to use only OnClick in the button and it shows an error.
Is there a way to do this?