婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > DataList中TextBox onfocus調(diào)用后臺(tái)void靜態(tài)方法及獲取相應(yīng)行數(shù)

DataList中TextBox onfocus調(diào)用后臺(tái)void靜態(tài)方法及獲取相應(yīng)行數(shù)

熱門標(biāo)簽:南陽(yáng)外呼系統(tǒng)定制化 百度ai地圖標(biāo)注 電話機(jī)器人軟件銷售工作 申請(qǐng)400電話手續(xù) 蘋果手機(jī)凱立德地圖標(biāo)注 同安公安400電話怎么申請(qǐng)流程 玉林市機(jī)器人外呼系統(tǒng)哪家好 合肥電銷外呼系統(tǒng)哪家公司做的好 預(yù)測(cè)式外呼系統(tǒng)使用說(shuō)明

昨天在某一論壇上看到的。Insus.NET嘗試做了一下,算是練習(xí)了。

Insus.NET的測(cè)試演示:

xxx.aspx: 

復(fù)制代碼 代碼如下:

asp:DataList ID="dlItemGeneral" runat="server" CellPadding="0" CellSpacing="0" Width="100%"
OnItemDataBound="dlItemGeneral_ItemDataBound">
ItemTemplate>
asp:Table ID="Table1" runat="server" CssClass="table">
asp:TableRow>
asp:TableCell CssClass="tableTemplateCell" Width="15%">
物料編碼 %# Eval("ItemCode") %>
/asp:TableCell>
asp:TableCell CssClass="tableCell" Width="30%">
asp:TextBox ID="TextBox1" runat="server">/asp:TextBox>
/asp:TableCell>
asp:TableCell CssClass="tableCell" Width="55%">
/asp:TableCell>
/asp:TableRow>
/asp:Table>
/ItemTemplate>
/asp:DataList>

xxx.aspx.cs:
復(fù)制代碼 代碼如下:

protected void dlItemGeneral_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
if (e.Item.FindControl("TextBox1") != null)
{
TextBox textBox = e.Item.FindControl("TextBox1") as TextBox;
textBox.Attributes.Add("OnFocus", "alert('" + GetRowNumber(e) + "'); this.value='" + GetTextBox(e) + "';");
}
}
}
private static string GetRowNumber(DataListItemEventArgs e)
{
return "當(dāng)前行號(hào)為" + (e.Item.ItemIndex + 1).ToString();
}
private static string GetTextBox(DataListItemEventArgs e)
{
return "這是從靜態(tài)方法獲取值和當(dāng)前行索引值為:" + e.Item.ItemIndex.ToString();
}

您可能感興趣的文章:
  • 獲取DataList控件的主鍵和索引實(shí)用圖解
  • 通過(guò)RadioButton對(duì)DataList控件進(jìn)行單選實(shí)例說(shuō)明
  • 動(dòng)態(tài)加載用戶控件至DataList并為用戶控件賦值實(shí)例演示
  • Datalist控件使用存儲(chǔ)過(guò)程來(lái)分頁(yè)實(shí)現(xiàn)代碼
  • asp.net datalist 用法

標(biāo)簽:淄博 嘉興 臺(tái)州 海南 南京 南昌 揚(yáng)州 南京

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《DataList中TextBox onfocus調(diào)用后臺(tái)void靜態(tài)方法及獲取相應(yīng)行數(shù)》,本文關(guān)鍵詞  DataList,中,TextBox,onfocus,調(diào)用,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《DataList中TextBox onfocus調(diào)用后臺(tái)void靜態(tài)方法及獲取相應(yīng)行數(shù)》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于DataList中TextBox onfocus調(diào)用后臺(tái)void靜態(tài)方法及獲取相應(yīng)行數(shù)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 溧阳市| 和政县| 聂荣县| 博湖县| 乌兰察布市| 榆中县| 景泰县| 涟水县| 和田市| 鄂州市| 澜沧| 禹城市| 明溪县| 澄迈县| 兰州市| 东光县| 新田县| 宁武县| 恩施市| 阿勒泰市| 乐业县| SHOW| 湘乡市| 大兴区| 元氏县| 灵寿县| 钟祥市| 伊春市| 内丘县| 大庆市| 呼和浩特市| 彝良县| 罗甸县| 铁力市| 东乡族自治县| 库车县| 宜君县| 凤凰县| 安塞县| 遵义县| 葵青区|