Tag Archives: ASP.NET

Refresh TreeView after insert/update/delete ?

Wrong solution : DataBind() BEFORE close()         TreeView1.DataBind()         con.Close() Right solution: In btnListtAdd_Click :   To get the ID         Dim lastID As String = “Select @@Identity”         Dim getID As Integer         ‘this is to get last ID … Continue reading

Posted in Databases, Programming, SQL-Server, 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

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