开发者

DataKey names in Form view

How to access dataKey values

 <asp:FormView ID="FormView1" runat="server"  Style="margin-right: 65px"
   DataKeyNames="MMBProfileID"
<ItemTemplate>
        <table id="FormViewTable" style="width: 100%;">
            <tr>
                <td>
                    Name:
                </td>
                <td>
                    <%# Eval("M开发者_C百科MB_Name") %>
                </td>

 protected void Page_Load(object sender, EventArgs e)
{
  MMBProfileId = Convert.ToInt32(FormView1.DataKey["MMBProfileID"]);
 FormView1.DataSource = objBLL.Execute_ViewBusinessProfile(MMBProfileId);

} This is giving me an error. Input string not in correct format at (FormView1.DataKey["MMBProfileID"]);

Any hints will be appreciated Thanks Sun


I would say FormView1.DataKey["MMBProfileID"] can't be converted to an integer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜