By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 IT Pros & Developers. It's quick & easy.

Page alignment changes when tried to upload unsupported file

P: 1
hi
I have a page to upload resume and valid file formats are
.doc
.docx
.pdf

I m in my testing phase tryinhg yo upload a image file..it works fine.shows error msg but the page alignment is lost..some issue with page

Expand|Select|Wrap|Line Numbers
  1.  <table width="100%" bgcolor="#99CCFF" style="margin-bottom:auto; margin-top:auto">
  2.  
  3.     <tr>
  4.             <td align="center" class="style1" bgcolor="#99CCFF">
  5.                 &nbsp;&nbsp;&nbsp;
  6.                 <br />
  7.                 <br />
  8.                 <br />
  9.                 <br />
  10.                 <br />
  11.                 <br />
  12.                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  13.                 <asp:FileUpload ID="FileUpload1" Text="Browse" runat="server" 
  14.                     Font-Bold="True" BorderColor="#FFFF66" />
  15.  
<asp:Button ID="btnUpload" Text="Upload" runat="server" Height="22px"
Width="95px" style="margin-right: 0px; margin-top: 0px"
onclick="btnUpload_Click" Font-Bold="True" />
</td>
</tr>
<tr>
<td align="center"

style="font-family: 'Times New Roman', Times, serif; font-size: medium; font-weight: normal; font-style: normal; font-variant: inherit; text-transform: inherit; color: #000000"
bgcolor="#99CCFF">
&nbsp;&nbsp;
Please Upload Your Resume file here. </td>
</tr>
<tr>
<td align="center" class="style1" bgcolor="#99CCFF">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
OnRowCommand="GridView1_RowCommand" AllowSorting="True"
AllowPaging="True" PageSize="1" OnPageIndexChanging="GridView1_Paging"
onsorting="GridView1_Sorting" CaptionAlign="Right" Font-Bold="False"
ForeColor="#333333" CellPadding="4" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField HeaderText="FileName" DataField="FileName" SortExpression="FileName" runat="server" />
<asp:BoundField HeaderText="Date Uploaded" DataField="DateUploaded" SortExpression="DateUploaded" runat="server" />

<%--<asp:BoundField HeaderText="Remarks" DataField="Remarks" runat="server" />--%>
<asp:BoundField HeaderText="AssociateId" DataField="AssociateId" SortExpression="AssociateId" runat="server" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CommandName="Download" Text="Download" CommandArgument='<%#Eval("ResumeId") %>' />
<asp:Button ID="Button2" runat="server" CommandName="DeleteRow" Text="Delete" OnClientClick='return confirm("Are you sure you want to delete this entry?");' CommandArgument='<%#Eval("ResumeId") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" BorderColor="Black" BorderStyle="Solid"
BorderWidth="1px" Font-Bold="True" Font-Underline="True"
ForeColor="White" />
<HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
Font-Bold="True" Font-Names="Arial" ForeColor="White"
BackColor="#5D7B9D" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>

<asp:Image ID="Image2" runat="server" Height="155px" ImageAlign="Left"
ImageUrl="~/Images/resume1.jpg" Width="162px" />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />

</td>
</tr>

</table>
Feb 20 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.