The big problem am facing on this is that on my web page i have about five Modal Pop Up which response when users click different buttons, for example; i have a click but that shows a Modal popup for User Posts and images,
see below
protected void OpenImageLink_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
}
javascript
<script type='text/javascript'>
function openModal() {
$('#myModal9t').modal('show');
}
</script>
Now here i have another Button that when users click on datalist it will popup a different Modal to show the videos
<script type='text/javascript'>
function openModal() {
$('#myvideo').modal('show');
}
</script>
protected void OpenVideoLink_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
}
Now see where the issue is, the problem is when i click any of the button it will only popup one Modal which means that the code on those two buttons that popup Modal does not repect the javascript of the two modals so it ends up popup one modal for every button clicks.
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
}
There is nothing wrong with the two IDs, you can show your example please.