Agave Information Solutions
Agave Information Solutions
Contact us for a free consultation or call 602.326.6924

JQuery UI and ASP.net

clock December 31, 2011 00:06 by author Admin

Many popular JQuery UI elements append the JavaScript to the Body of the HTML. This does not allow the asp controls to be exposed without some work such as passing control values from DropDownLists to hidden fields in the main Form. A way to work arround this is to simply change the JQuery script you are using.

For Example the Twitter Bootstrap Modal can be changed like this

.appendTo(document.body)
.appendTo('form')


Expression column readonly work around

clock January 6, 2011 09:27 by author Admin

“Cannot change ReadOnly property of the expression column”, has been a known bug since 2002 in the .net framework.

Basically when you use an insert and update with your column you will have this error. An easy work around is to simply copy the content from a non expression column and manipulate the data row by row.

This example creates a hyperlink from table data, removing spaces and adding a page suffix.

Dim row As DataRow
For Each row In myDataSet.Tables("DT1").Rows
row("C2") = row("C1").ToString.Replace(" ", "-")
row("C2") = row("C2").ToString + "-page.aspx"
Next



Permanent 301 Redirect ASP.NET

clock November 24, 2010 03:09 by author Admin

 

If you ever need to get rid of a page but keep its link juice, you should do a 301 Redirect.

C# Version

 

 

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{

Response.Status = "301 Moved Permanently"; 
  Response.AddHeader("Location", "/");

}

</script>

 

 

 

 

VB Version

 

    <script runat="server">

    Protected Sub page_load()

        Response.Status = "301 Moved Permanently"

        Response.AddHeader("Location", "toenail-fungus.aspx")

        Response.End()

    End Sub

</script>

 

 

 

 



Proudly providing web design, web development and search engine optimization services to clients in the Phoenix, Scottsdale, Tempe, Mesa, Chandler, Gilbert, Glendale, Peoria, Paradise Valley, and Fountain Hills areas. As well as throughout Arizona and the World.