$('a').click(function (e) {
try{
your code here.........
}
catch(e){}
return false;
});
dot net tips, DotNet tips, .Net Tips,Dot Net tips and tricks,Dot Net Solutions, OOPS Concept in C#,SQL Server, LinQ, Ajax, Java script, JQuery, Server Error details, daily .net tips and tricks , DotNet Interview Questions.
try catch in javascript
We can use try catch function in java script.
MultiView:
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:view id=view1" runat ="server">
</view>
<asp:view id=view2" runat ="server">
</view>
</Multiview>
Previous Button:
protected void btnPrev_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex--;
}
Next Button:
protected void btnNext_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex++;
}
protected override void OnPreRender(EventArgs e)
{
btnPrev.Visible = MultiView1.ActiveViewIndex > 0;
btnNext.Visible = MultiView1.ActiveViewIndex < MultiView1.Views.Count - 1;
base.OnPreRender(e);
}
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:view id=view1" runat ="server">
</view>
<asp:view id=view2" runat ="server">
</view>
</Multiview>
Previous Button:
protected void btnPrev_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex--;
}
Next Button:
protected void btnNext_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex++;
}
protected override void OnPreRender(EventArgs e)
{
btnPrev.Visible = MultiView1.ActiveViewIndex > 0;
btnNext.Visible = MultiView1.ActiveViewIndex < MultiView1.Views.Count - 1;
base.OnPreRender(e);
}