Question:-Ajax Slider Show Extender Control Image Click Event i want to do somthing ?
Answer:-
.aspx
<%-- Below image is Slider Show Image --%>
<a onclick ="popshow();" href ="#" >
<asp:Image runat ="server" ID ="img1" /></a>
<%-- Below Script get image url --%>
<script language ="javascript" type ="text/javascript">
function popshow() {
var img = new Image();
var x = document.getElementById('<%=img1.ClientID%>').src;
alert(x);
//if u pass image url to code behind window write var z method
var z = "<%=chkup(" + x + ")%>";
alert(z);
//if u pass image url as query string
window.location.href='yourwebsitelocation?a='+x+';
}
</script>
.aspx.cs
public static string chkup(string url)
{
return "good";
}
Answer:-
.aspx
<%-- Below image is Slider Show Image --%>
<a onclick ="popshow();" href ="#" >
<asp:Image runat ="server" ID ="img1" /></a>
<%-- Below Script get image url --%>
<script language ="javascript" type ="text/javascript">
function popshow() {
var img = new Image();
var x = document.getElementById('<%=img1.ClientID%>').src;
alert(x);
//if u pass image url to code behind window write var z method
var z = "<%=chkup(" + x + ")%>";
alert(z);
//if u pass image url as query string
window.location.href='yourwebsitelocation?a='+x+';
}
</script>
.aspx.cs
public static string chkup(string url)
{
return "good";
}