用C#编辑Asp.net页面 [英] Asp.net Edit page with C#

查看:60
本文介绍了用C#编辑Asp.net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须创建一个可以编辑事件的页面。我必须有一个下拉列表,列出事件的名称。然后在下拉列表中选择事件后,它将显示隐藏的文本框,如时间,地点,事件日期。然后我需要使用添加按钮添加这些事件。我添加了Dropbox但是当我选择我的事件时,文本框不会显示。

I have to make a page where i can edit events. I would have to have a dropdown list that puts the name of the event. Then after selecting the event in the dropdown, it would show hidden textboxs like time, place, date of the event. Then i need to add these events using the add button. I added the dropbox but when i select my event, the textboxes don''t show.

推荐答案

您可以在客户端代码中执行以下操作。



You can do it as below in clientside code.

<form id="form1"  runat="server">
  <div>
    <select id="Select1" name="D1"  önchange="DataEntryPanel.style.display=''block''">
      <option selected="selected" id="">Please Select</option>
      <option id="Wedding">Wedding</option>
      <option id="Lunch">Lunch</option>
    </select><br /><br />

    <div id="DataEntryPanel" style="display: none;">
      Event Name <input id="Text1" type="text" /><br /><br />
      Time       <input id="Text2" type="text" /><br /><br />
      Location   <input id="Text3" type="text" /><br /><br />
      <input type="submit id="btnSubmit" name="btnSubmit" value="Submit" />
    </div>
  </div>
</form>


这篇关于用C#编辑Asp.net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆