locked
How to open a outlook mailbox window on clicking emailid RRS feed

  • Question

  • User-1766955437 posted

    i have a grid with linkbutton in gridview for email id,  please help me for "How to open a outlook mailbox window on clicking emailid in grid view "

    this is the asp.net code

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="357px" OnRowEditing="GridView1_RowEditing" >
                                      <Columns>
                                          <asp:TemplateField HeaderText="Enquiry number">
                                              <ItemTemplate>
                                                 <!-- <asp:Label ID="Label1" runat="server" Text='<%#Eval("Enquiry_No")%>'></asp:Label>-->
                                                  <asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("Enquiry_No")%>' CommandName="Edit" ></asp:LinkButton>
                                              </ItemTemplate>
                                              <ItemStyle HorizontalAlign ="Center" />
                                              
                                          </asp:TemplateField>
                                          <asp:TemplateField HeaderText="Name">
                                              <ItemTemplate>
                                                  <asp:Label ID="Label2" runat="server" Text='<%#Eval("Enquiry_Name")%>'></asp:Label>
                                              </ItemTemplate>
                                               <ItemStyle HorizontalAlign ="Center" />
                                          </asp:TemplateField>
                                          <asp:TemplateField HeaderText="Email id">
                                              <ItemTemplate>
                                                  <!--<asp:Label ID="Label3" runat="server" Text='<%#Eval("Enquiry_EmailId1")%>'></asp:Label>-->
                                                  <asp:LinkButton ID="LinkButton2" runat="server" Text='<%#Eval("Enquiry_EmailId1")%>' OnClientClick="emailclient()"></asp:LinkButton>
                                              </ItemTemplate>
                                               <ItemStyle HorizontalAlign ="Center" />
                                          </asp:TemplateField>
                                          <asp:TemplateField HeaderText="Enquiry">
                                              <ItemTemplate>
                                                 
                                                  <asp:Label ID="Label4" runat="server" Text='<%#Eval("Enquiry_Enquiry")%>'></asp:Label>
                                              </ItemTemplate>
                                          </asp:TemplateField>
                                      </Columns>
                                  </asp:GridView>





    Friday, September 17, 2010 4:28 AM

Answers

All replies

  • Friday, September 17, 2010 5:03 AM
  • User-1766955437 posted

    its giving error in format  ................... please check bellow code...


    i putted as u told , but some syntax error may be there


    <asp:TemplateField HeaderText="Email id">
                                              <ItemTemplate>
     
                                                  <asp:HyperLink ID="Label22" runat="server" Text='<%# "'" mce_href="mailto:"+Eval("CostCenter")%>'">mailto:"+Eval("CostCenter")%>' NavigateUrl='<%# "'>'>mailto:"+Eval("Enquiry_EmailId1")%>'></asp:HyperLink>
                                              </ItemTemplate>
                                               <ItemStyle HorizontalAlign ="Center" />
                                          </asp:TemplateField>

    Friday, September 17, 2010 5:57 AM
  • User-906034138 posted

    <asp:HyperLink ID="Label22" runat="server" Text='<%# "'" mce_href="mailto:"+Eval("CostCenter")%>'">mailto:"+Eval("CostCenter")%>'> </asp:HyperLink> 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 17, 2010 6:44 AM
  • User-906034138 posted
     
    <asp:HyperLink ID="Label22" runat="server" Text='<%# "mailto:"+Eval("CostCenter")%>' NavigateUrl='<%# "mailto:"+Eval("CostCenter")%>'> </asp:HyperLink> 


     

    Friday, September 17, 2010 6:48 AM