Category Archives: ASP.NET

One page PDF don’t open in IE8

Very weired !!! I can open 2 or more PDF pages in IE8, but one page or less IE8 can’t and gives me this error message: The file is damaged and could not be repaired. By the way, Chrome can. … Continue reading

Posted in ASP.NET, Error Message, Programming, VB.NET | Tagged , , , , | Leave a comment

Two Tables Side by Side

The secret is in adding style=”float:right” <asp:Table runat=”server” style=”float:right”>   <asp:TableRow>  <asp:TableCell>Table1 Cell1  </asp:TableCell>  </asp:TableRow>  </asp:Table>  <asp:Table ID=”Table1″ runat=”server” style=”float:right”>   <asp:TableRow>  <asp:TableCell>Table2 Cell1  </asp:TableCell>  </asp:TableRow>  </asp:Table>

Posted in ASP.NET | Tagged , | Leave a comment

Copy Cell in GridView

In GridView add this column:  <asp:CommandField ButtonType=”Button” SelectText=”” ShowSelectButton=”True” /> [\sourcecode] Then in code-behind: Protected Sub GridViewHandLinks_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)   If e.CommandName.Equals(“Select“) Then   Dim index As Integer = Convert.ToInt32(e.CommandArgument)   Dim row As GridViewRow … Continue reading

Posted in ASP.NET, Programming, VB.NET | Tagged , , | Leave a comment

Hide a GridView Column

If GridView1.Columns(0).Visible = False there will be an error: Index is out o range. Solution: GridView1.DataBind() If GridView1.Columns.Count > 0 Then         GridView1.Columns(0).Visible = False Else         GridView1.HeaderRow.Cells(0).Visible = False         For Each gvr As GridViewRow In GridView1.Rows                 gvr.Cells(0).Visible … Continue reading

Posted in ASP.NET, Programming | Tagged , , | Leave a comment

Customize image to fit into the page

Sometimes the image width is bigger than the page. So to set it in pagelayout , alter the attributr size like this: style=”width: 890px;” will control this. <asp:Image ID=”Banner” runat=”server” ImageUrl=”~/images/bannar.jpg”                             style=”width: 890px; vertical-align:middle; text-align:center;” /> The div width … Continue reading

Posted in ASP.NET, Programming | Tagged , , , , | Leave a comment

Error Msg: Server Error in ‘/folder‘ Application … A potentially dangerous Request.Form value was detected

Error Msg: Server Error in ‘/folder‘ Application … A potentially dangerous Request.Form value was detected Solution: Add ValidateRequest=”false” to the <% Page tag for example if you already have: <%@ Page Language=”vb” AutoEventWireup=”false” Codebehind=”MyForm.aspx.vb” Inherits=”Proj.MyForm”%> then this should become: <%@ … Continue reading

Posted in ASP.NET, Programming | Tagged , , , | Leave a comment

Frames vs Tables

Frames vs Tables Frames divide up your browser window into separate areas. In each of these a page is loaded. Tables divide up a web page into separate cells. Frames Disadvantages: Frames are not very good for web search engines … Continue reading

Posted in ASP.NET, Comparison, Programming | Tagged , , , , | Leave a comment