form那里的“登陆”用图片怎么写?

smallmuda 2003-10-15 04:12:02
<input type="image" name="loginbbs" src="images/submit.gif" alt="登录技术论坛" border="0" style="height:22px;width:42px;">

asp 里是这样写,按c#里怎么写
我之前都是用button的
...全文
36 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
LighBlade 2003-10-15
  • 打赏
  • 举报
回复
同意 qiuji(忆秋季)写法!UPUPUP!!!
changezhong 2003-10-15
  • 打赏
  • 举报
回复
同意楼上,因为登录的逻辑比较复杂,直接写在页面上不好,所以一般放在后台,怎样实现按
qiuji(忆秋季) 老兄的方法去做就好了
qiuji 2003-10-15
  • 打赏
  • 举报
回复
更正一下,
去掉: style="Z-INDEX: 103; LEFT: 168px; POSITION: absolute; TOP: 208px"
即为:
<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="images/submit.gif"></asp:ImageButton>
qiuji 2003-10-15
  • 打赏
  • 举报
回复
在.aspx文件中,添加:
<asp:ImageButton id="ImageButton1" style="Z-INDEX: 103; LEFT: 168px; POSITION: absolute; TOP: 208px" runat="server" ImageUrl="images/submit.gif"></asp:ImageButton>

在.aspx.cs文件中,添加:

protected System.Web.UI.WebControls.ImageButton ImageButton1;

//按钮点击事件
private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
//此处写上你的登录事件
}
liutaoboy 2003-10-15
  • 打赏
  • 举报
回复
Asp.net里有<asp:ImageButton id=ImageButton1 runat="server" Width="144px" ImageUrl="images/submit.gif" Height="33px" TOOLTIP="登录技术论坛"></asp:ImageButton>
acewang 2003-10-15
  • 打赏
  • 举报
回复
<%@ Page Language="C#" %>
<html>
<head>
<script runat="server">
void ImageButton_Click(object Source, ImageClickEventArgs e)
{
Label1.Text="You clicked the ImageButton control at the " +
"Coordinates: (" + e.X.ToString() + ", " +
e.Y.ToString() + ")";
}
</script>
</head>
<body>
<form runat="server">
<h3>ImageButton Sample</h3>
Click anywhere on the image.<br><br>
<asp:ImageButton id="imagebutton1"
AlternateText="ImageButton 1"
ImageAlign="left"
ImageUrl="images\pict.jpg"
OnClick="ImageButton_Click"
runat="server"/>
<br><br>
<asp:Label id="Label1"
runat="server"/>
</form>
</body>
</html>

110,500

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧