ferankyy
دوشنبه 15 فروردین 1390, 10:28 صبح
با سلام
من با استفاده از کد زیر عکس زمینه ImageButton هام رو هنگام رویداد onmouseover و onmouseout تغییر میدم وهیچ مشکلی نداشتم
<script type="text/javascript">
var jjfn = new Image();
jjfn.src =
"Picc/newpost.png";
var kkfn = new Image();
kkfn.src =
"Picc/newpost2.png";
function moverfn() {
document.getElementById(
'<%=imgnewpost.ClientID%>').src = "Picc/newpost2.png";
}
function moutfn() {
document.getElementById(
'<%=imgnewpost.ClientID%>').src = "Picc/newpost.png";
}
</
script>
حالا داخل MasterPage چندتا ImageButton داشتم که اونها رو هم با استفاده از همین کد عکس هاشون رو عوض کردم ولی وقتی میخوام وارد یکی از صفحاتی که به مستر پیج مربوط هست و از همین کد داخلش استفاده کردم وارد بشم این ارور میده و وارد نمیشه
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
من با استفاده از کد زیر عکس زمینه ImageButton هام رو هنگام رویداد onmouseover و onmouseout تغییر میدم وهیچ مشکلی نداشتم
<script type="text/javascript">
var jjfn = new Image();
jjfn.src =
"Picc/newpost.png";
var kkfn = new Image();
kkfn.src =
"Picc/newpost2.png";
function moverfn() {
document.getElementById(
'<%=imgnewpost.ClientID%>').src = "Picc/newpost2.png";
}
function moutfn() {
document.getElementById(
'<%=imgnewpost.ClientID%>').src = "Picc/newpost.png";
}
</
script>
حالا داخل MasterPage چندتا ImageButton داشتم که اونها رو هم با استفاده از همین کد عکس هاشون رو عوض کردم ولی وقتی میخوام وارد یکی از صفحاتی که به مستر پیج مربوط هست و از همین کد داخلش استفاده کردم وارد بشم این ارور میده و وارد نمیشه
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).