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')


JQuery UI and ASP.net

clock December 30, 2011 23:59 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')

 



JQuery UI and ASP.net

clock December 30, 2011 23:59 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')

 



Searching by ZIP code using a shared procedure

clock April 12, 2011 03:29 by author Admin

1 Make a Stored Function...

ALTER DEFINER=`XXXX`@`XXXXt` FUNCTION `GetDistance`(  
 lat1  numeric (9,6),  
 lon1  numeric (9,6),  
 lat2  numeric (9,6),  
 lon2  numeric (9,6)  
) RETURNS decimal(10,5)
BEGIN  
  DECLARE  x  decimal (20,10);  
  DECLARE  pi  decimal (21,20);  
  SET  pi = 3.14159265358979323846;  
  SET  x = sin( lat1 * pi/180 ) * sin( lat2 * pi/180  ) + cos(  
 lat1 *pi/180 ) * cos( lat2 * pi/180 ) * cos(  abs ( (lon2 * pi/180) -  
 (lon1 *pi/180) ) );  
  SET  x = atan( ( sqrt( 1- power( x, 2 ) ) ) / x );  
  RETURN  ( 1.852 * 60.0 * ((x/pi)*180) ) / 1.609344;  
END

2. Make a stored procedure

PROCEDURE `GetNearbyZipCodes`(zipbase  varchar (6), ziprange numeric (15))
BEGIN  
DECLARE  lat1  decimal (5,2);  
DECLARE long1 decimal (5,2);
DECLARE rangeFactor decimal (7,6);
SET rangeFactor = 0.014457;
SELECT latitude,longitude into lat1,long1 FROM zips WHERE ZIPcode = zipbase;
SELECT B.ZIPcode
FROM zips AS B
WHERE
B.latitude BETWEEN lat1-(ziprange*rangeFactor) AND lat1+(ziprange*rangeFactor)
AND B.longitude BETWEEN long1-(ziprange*rangeFactor) AND long1+(ziprange*rangeFactor)
AND GetDistance(lat1,long1,B.latitude,B.longitude) <= ziprange;
END

3. Access it in your code


       Dim sqlcon As New MySqlConnection(ConnString)
Dim reader As MySqlDataReader
Dim cmd As MySqlCommand = New MySqlCommand
cmd.Parameters.AddWithValue("@zipbase", "85250")
cmd.Parameters.AddWithValue("@ziprange", "30") cmd.CommandText = "GetNearbyZipCodes"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = sqlcon
sqlcon.Open()
reader = cmd.ExecuteReader()
GridView1.DataSource = reader
GridView1.DataBind()
sqlcon.Close()

This will display all the results of ZIP codes in a 30 mile radius around 85250




List of Internet Yellow Pages Sites

clock January 19, 2011 09:53 by author Admin

IYP (internet yellow pages) sites will help give your google local listing credibillity. Credibillity = Rank
  1. Superpages
  2. Citysearch
  3. Yelp
  4. Yahoo Local
  5. InsiderPages
  6. YellowPages.com
  7. BizJournals
  8. AreaConnect
  9. MagicYellow
  10. Switchboard
  11. MerchantCircle
  12. GetFave
  13. Yellowbot
  14. Yellowpages.Lycos.com
  15. Kudzu
  16. Discoverourtown
  17. Loqal.com
  18. Local.Ingenio.com
  19. YellowUSA.com
  20. IAF.net

 



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>

 

 

 

 



Is the Yahoo Directory Worth It?

clock October 18, 2010 23:57 by author Admin

Getting a high page rank is very dependent on who links into you and their page rank. The more pages of high value linking to you the higher your site will rank. Think of it as not what you know but who you know. The Yahoo! Directory is a site that is ranked about as high as one can get. So getting a listing in the Yahoo! directory can have very good benefits for your site in addition to the traffic they send you. However, the traffic they send you will probably not be significant. Back in the day, many people used the Yahoo! Directory as it was the home page of Yahoo!. Well those days are long gone and the Yahoo! Directory appears to be dying slow death. Currently Yahoo! charges $299 to get listed, which brings us back to the question, "Is it worth it?" The answer is Yes and No. We would advise no if you have a moderate budget of less than $3000 a year. 10% of your budget on Yahoo! is a waste in light of other strategies and pay-per-click opportunities. However we would advise Yes if your budget is higher, as it may make sense to get the listing and the associated rank value if it is a small part of your budget.



Newsites

clock July 1, 2010 15:42 by author Admin

Ayahuasca Retreats

Scottsdale SEO Consulting

Blue Eyes Laser

Laser Liposuction

Latina Casting Couch



Website Linking

clock October 18, 2009 23:55 by author Admin

All major search engines will index your site and rank it in their listing based on many variables, however one of the most important ones is website linking. What this means to a website owner is that your site will have a higher rank the more sites that link to it. Links into your site are also evaluated based on the rank of the site linking in. The more popular the incoming link the more valuable. The most popular search engine Google refers to this value as pagerank. Here are the most popular strategies for increasing website linking.

1. Link Bait

2. Reciprocal Linking

3. One-way Linking

4. Multi-way Linking

5. Link Campaign

6. Incestuous Linking



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.