JavaScript读取自定义控件属性 - .NET技术 / ASP.NET
HTML code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="imagecon" Namespace="imagecon" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" language="JavaScript">
var image=document.getElementById(Imagecon1.ClientID).getAttribute("ImageName");
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<cc1:imagecon ID="Imagecon1" runat="server" ImageName="image2.jpg">
</cc1:imagecon>
</div>
</form>
</body>
</html>
请问如何读取自定义控件中的ImageName属性?
看你自定义控件 生成的 html 代码
用这个看看。。
JScript code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
相关问答:
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
3个radioButton
一个Button
一个label
C# code:
protected void Button1_Click(object sender, EventArgs e)
{
string str = null;
RadioButton rdo=(RadioButton)sender;
......
1.asp.net做的一个答题页面,如何实时限时后自动提交,请大家给点思路
限时的时间信息存放在数据库中
2.如果答题时间设置的较长,如何方式session超时后页面无效
谢谢
用js方法来控制
回复内容太短了。。
js ......