vendredi 31 juillet 2015

When I selecting the combobox items its deleting or refreshing the attachments the file

I developed the compose message from email,

I attaching the files then i have selecting the combo box item its deleting the attachment files.

Here my ASP Code:

<asp:UpdatePanel ID="updatepanel" runat="server">
                                            <ContentTemplate>
                                                <tr>
                                                    <td valign="top">
                                                        <asp:Label ID="lblfile_name" runat="server" CssClass="labels">Upload File</asp:Label>
                                                    </td>
                                                    <td>
                                                        <div style="overflow-y: scroll; z-index: auto; height: 60px;">
                                                            <asp:FileUpload ID="FileUpload1" runat="server" CssClass="multi" Visible="true" />
                                                        </div>
                                                    </td>
                                                </tr>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>


                                           <tr>
                                            <td>
                                                <telerik:RadComboBox EmptyMessage="----- Select -----" ID="cboTemplate" runat="server" Skin="WebBlue" AutoPostBack="true">
                                                </telerik:RadComboBox>
                                            </td>

                                        </tr>

Here VB. NET CODE

   Private Sub cboTemplate_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboTemplate.SelectedIndexChanged
    If cboTemplate.SelectedValue = "--Select--" Then
        lblErrMsg.Text = objcmnfunctions.GetErrMsg("B2B_WAR_110")
        SetFocus(anc_err)
        Exit Sub
    End If
    objdbconn.OpenConn()
    msSQL = " Select mailtemplate_gid, template_name, template_content " & _
            " from crm_trn_tmailtemplates " & _
            " where mailtemplate_gid = '" & cboTemplate.SelectedValue & "'"
    objOdbcDataReader = objdbconn.GetDataReader(msSQL)
    If objOdbcDataReader.HasRows = True Then
        objOdbcDataReader.Read()
        radmailcontent.Content = objOdbcDataReader.Item("template_content").ToString
    End If
    objOdbcDataReader.Close()
    objdbconn.CloseConn()
End Sub

Aucun commentaire:

Enregistrer un commentaire