子页中的代码<td class="content_blue12" align="right" style="height: 8px; width:13%">テスト時間: </td>
<td style="height: 8px; width:34%">
<asp:TextBox ID="TextBox1" runat="server"> </asp:TextBox> </td>
<td class="content_blue12" align="right" style="height: 8px; width:13%">試験科目: </td>
<td style="height: 8px; width:25%">
<asp:DropDownList ID="DropDownList1" runat="server" Height="23px" Width="171px">
</asp:DropDownList> </td>
<td align="right" style="height: 8px; width:15%">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="検索" Width="80px" /> </td>
母版也中的代码
<td class="content_blue12" align="right" style="height: 8px; width:13%">テスト時間: </td>
<td style="height: 8px; width:34%">
<input name="ctl00$ContentPlaceHolder1$TextBox1" type="text" id="ctl00_ContentPlaceHolder1_TextBox1" onfocus="show_cele_date(ctl00$ContentPlaceHolder1$TextBox1,'','',ctl00$ContentPlaceHolder1$TextBox1)" /> </td>
<td class="content_blue12" align="right" style="height: 8px; width:13%">試験科目: </td>
<td style="height: 8px; width:25%">
<select name="ctl00$ContentPlaceHolder1$DropDownList1" id="ctl00_ContentPlaceHolder1_DropDownList1" style="height:23px;width:171px;"></select> </td>
<td align="right" style="height: 8px; width:15%">
<input type="submit" name="ctl00$ContentPlaceHolder1$Button1" value="検索" id="ctl00_ContentPlaceHolder1_Button1" style="width:80px;" /> </td>
<td style="height: 8px; width:34%">
<asp:TextBox ID="TextBox1" runat="server"> </asp:TextBox> </td>
<td class="content_blue12" align="right" style="height: 8px; width:13%">試験科目: </td>
<td style="height: 8px; width:25%">
<asp:DropDownList ID="DropDownList1" runat="server" Height="23px" Width="171px">
</asp:DropDownList> </td>
<td align="right" style="height: 8px; width:15%">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="検索" Width="80px" /> </td>
母版也中的代码
<td class="content_blue12" align="right" style="height: 8px; width:13%">テスト時間: </td>
<td style="height: 8px; width:34%">
<input name="ctl00$ContentPlaceHolder1$TextBox1" type="text" id="ctl00_ContentPlaceHolder1_TextBox1" onfocus="show_cele_date(ctl00$ContentPlaceHolder1$TextBox1,'','',ctl00$ContentPlaceHolder1$TextBox1)" /> </td>
<td class="content_blue12" align="right" style="height: 8px; width:13%">試験科目: </td>
<td style="height: 8px; width:25%">
<select name="ctl00$ContentPlaceHolder1$DropDownList1" id="ctl00_ContentPlaceHolder1_DropDownList1" style="height:23px;width:171px;"></select> </td>
<td align="right" style="height: 8px; width:15%">
<input type="submit" name="ctl00$ContentPlaceHolder1$Button1" value="検索" id="ctl00_ContentPlaceHolder1_Button1" style="width:80px;" /> </td>
解决方案 »
- Sql Server Express Edition2005数据库连接到Visual Studio的具体步骤
- radiobutton
- 为什么执行上面的,下面的就没反应了呢
- 散分题!在图片上覆盖层会不会造成不良影响?
- setInterval()和setTimeout()的区别?
- 关于IIS编程的一些资料
- 十万火急——高手指点!使用AspXGrid模板列上传文件,要求:在datagrid中每行都有上传按钮,单击打开一个新浏览窗口,然后将选定的文件以
- 是.NET的程序员的进来!!!
- c#中怎么把十进制转成十六进制,反之呢?
- asp 后台给js传值的问题
- 初学者请教!!!怎么为GridView创建EditCommand,UpdateCommand,CancelCommand事件处理程序?
- Server Error in '/' Application
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack != false)
{
return;
} this.TextBox1.Attributes.Add("onfocus", "show_cele_date(document.getElementById('<%=TextBox1.ClientID%>')),'','',document.getElementById('<%=TextBox1.ClientID%>')");
}
我在里面这样写,好像还是不对。show_cele_date这个事js文件里面的一个方法。
错误是
public static WebInvokeContext CreateWebInvokeContext(HttpApplication context)
{
WebInvokeContext wIContext = new WebInvokeContext();
wIContext.application = context.Application;
wIContext.context = context.Context;
wIContext.request = context.Request;
wIContext.response = context.Response;
wIContext.server = context.Server;
wIContext.session = context.Session; このコンテキストでセッション状態は利用できません。
return wIContext;
}
意思是说这个通过context ,session状态不能利用
this.TextBox1.Attributes.Add("onfocus", "show_cele_date(TextBox1.ClientID,'','',TextBox1.ClientID)");
这样传递参数也是错误的按照上面的写法 也是错误的
this.TextBox1.Attributes.Add("onfocus", "show_cele_date(document.getElementById(' <%=TextBox1.ClientID%>')),'','',document.getElementById(' <%=TextBox1.ClientID%>')");