Click here to Skip to main content
16,020,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on a project.I have a datalist that has panel shown when click on link button.this panel has textboxes and buttons.on button click i wana send mail.i know the coding of send mail but here m getting a problem that how to use the controls inside panel.source is as:

XML
<asp:DataList ID="dlsearch" runat="server" CellPadding="4" ForeColor="#333333">
                                <FooterStyle BackColor="#D5E3F1" Font-Bold="True" ForeColor="White" />
                                <AlternatingItemStyle BackColor="#D5E3F1" />
                                <ItemStyle BackColor="#D5E3F1" />
                                <SelectedItemStyle BackColor="#D5E3F1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#D5E3F1" Font-Bold="True" ForeColor="White" />
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <b>Property ID :</b>&nbsp;<%#Eval("pid")%>
                                        </td>
                                        <td>
                                            <b>Property Type :</b>&nbsp;<%#Eval("protype")%>&nbsp;&nbsp;
                                        </td>
                                        <td>
                                            <b>Bedrooms :</b>&nbsp;<%# Eval("bedrooms")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>Covered Area :</b>&nbsp;<%# Eval("coveredarea")%>&nbsp;&nbsp;
                                        </td>
                                        <td>
                                            <b>Plot Area :</b>&nbsp;<%# Eval("plotarea")%>&nbsp;&nbsp;
                                        </td>
                                        <td>
                                            <b>Monthly Price :</b>&nbsp;<%# Eval("totalprice")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>Per Unit Price :</b>&nbsp;<%# Eval("perunitprice")%>&nbsp;&nbsp;
                                        </td>
                                        <td>
                                            <b>Available :</b>&nbsp;<%# Eval("available")%>
                                        </td>
                                        <td>
                                            <b>Available Units :</b>&nbsp;<%# Eval("availableunits")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>Facing :</b>&nbsp;<%# Eval("facing")%>
                                        </td>
                                        <td>
                                            <b>Locality :</b>&nbsp;<%# Eval("locality")%>
                                        </td>
                                        <td>
                                            <b>City :</b>&nbsp;<%#Eval("city") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>Address :</b>&nbsp;<%# Eval("adress") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                           <asp:LinkButton ID="lnkbtn" runat="server" onclick="lnkbtn_Click">Send Email</asp:LinkButton>
                                           <asp:Literal ID="litmsg" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelemail" runat="server" Visible="false">
                                                <tr>
                                                    <td>
                                                        Name:<font color="red">*</font><asp:TextBox ID="txtname" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvname" runat="server" ErrorMessage="*" ControlToValidate="txtname"></asp:RequiredFieldValidator>
                                                    </td>
                                                    <td>
                                                        Email:<font color="red">*</font><asp:TextBox ID="txtemail" runat="server"></asp:TextBox>
                                                        <asp:RegularExpressionValidator ID="revemail" runat="server" ErrorMessage="*" ControlToValidate="txtemail" ValidationGroup="g"></asp:RegularExpressionValidator>
                                                    </td>
                                                    <td>
                                                        Mobile No.:<font color="red">*</font><asp:TextBox ID="txtmobile" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        LandLine<font color="red">*</font>:<asp:TextBox ID="txtLand" runat="server"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        Preferred Time To Call:<asp:DropDownList ID="ddltime1" runat="server">
                                                        <asp:ListItem>12Hr</asp:ListItem>
                                                        <asp:ListItem>01</asp:ListItem>
                                                        <asp:ListItem>02</asp:ListItem>
                                                        <asp:ListItem>03</asp:ListItem>
                                                        <asp:ListItem>04</asp:ListItem>
                                                        <asp:ListItem>05</asp:ListItem>
                                                        <asp:ListItem>06</asp:ListItem>
                                                        <asp:ListItem>07</asp:ListItem>
                                                        <asp:ListItem>08</asp:ListItem>
                                                        <asp:ListItem>09</asp:ListItem>
                                                        <asp:ListItem>10</asp:ListItem>
                                                        <asp:ListItem>11</asp:ListItem>
                                                        <asp:ListItem>12</asp:ListItem>
                                                        </asp:DropDownList>
                                                        &nbsp;
                                                        <asp:DropDownList ID="ddltime2" runat="server">
                                                        <asp:ListItem>AM/PM</asp:ListItem>
                                                        <asp:ListItem>AM</asp:ListItem>
                                                        <asp:ListItem>PM</asp:ListItem>
                                                        </asp:DropDownList>
                                                        &nbsp;
                                                        <asp:DropDownList ID="ddltime3" runat="server">
                                                        <asp:ListItem>Select Day</asp:ListItem>
                                                        <asp:ListItem>All Days</asp:ListItem>
                                                        <asp:ListItem>Only Weekdays</asp:ListItem>
                                                        <asp:ListItem>Only Weekends</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>

                                                    <td>
                                                    Message:<asp:TextBox ID="txtmsg" runat="server" TextMode="MultiLine"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr><td><asp:Button ID="btnsub" runat="server" Text="Submit" onclick="btnsub_Click" /></td></tr>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <hr />
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:DataList>

Please reply
Thank You.
Posted
Comments
p_karthik_p 25-Jul-11 12:25pm    
What do you want here?
Unable to get the controls in row command or you don't know row command?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900