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 ......
function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;
var div1=document.getElementById("divPwd");
if (pwd.value=="")
{
......
3个radioButton
一个Button
一个label
C# code:
protected void Button1_Click(object sender, EventArgs e)
{
string str = null;
RadioButton rdo=(RadioButton)sender;
......
就是一个按钮,点击之后打开对话框,然后选取图片。就这样上传。。
怎么实现。在网上搜到那么多的代码,全是很多的那种,不知道,看不下去。
所以在这里想请大哥大姐帮帮忙。
使用自带的fileupload控件可以实现 ......
我用的是Godaddy的服务,使用
C# code:
HttpRuntime.UnloadAppDomain();
来重启程序会抛出异常,应该是权限不够,请教大家还有没有其他的办法?
using System.ServiceProcess;
public void ResetAsp ......