Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Wednesday, March 28, 2012

AJAX Beta 2 and Toolkit 61102 released but missing CalendarExtender, TabPanel and TabConta

Any idea if these are likely to be put back in as I finally got them working?

Calendar and Tabs currently only exist in the Development branch as they are not yet stable for release. I believe that the beta2 changes in the Release branch will be merged back into the Development branch soon.

I have 55 pages using Tabs now and about 40 other pages that need the fixes in the Beta2 release.

This now makes it difficult to decide whether to temporarily code out all the Tab panels somehow and replace them with something else or wait until Tabs are back in the Toolkit.

Any idea when the Tabs will be back in? Guess?

Help...please...Crying


I'm looking at migrating Tabs right now, but keep in mind tabs is currently still in development and is not fully stable enough for the release branch. Its implementation may still change slightly before it hits the release.
Thanks. Much appreciated.

Monday, March 26, 2012

Ajax autocomplete method

Hi! Is there an example of doing the ajax autocomplete using sql as the back end. This is the method they have on there:publicstring[] GetCompletionList(string prefixText,int count)

{

if (count == 0)

{

count = 10;

}

Random random =newRandom();

List<string> items =newList<string>(count);

for (int i = 0; i < count; i++)

{

char c1 = (char)random.Next(65, 90);

char c2 = (char)random.Next(97, 122);

char c3 = (char)random.Next(97, 122);

items.Add(prefixText + c1 + c2 + c3);

}

return items.ToArray();

}

Basically I'd like to change this method to be an sql server method. Thanks for any tips

This is a stripped down example that might help get you started:

 [WebMethod]
public string[] GetCustomerList(string prefixText,int count)
{
OleDbConnection conn =new OleDbConnection("ConnectionStringGoesHere");
OleDbCommand cmd =new OleDbCommand();

cmd.Connection = conn;

cmd.CommandText =string.Format("select customer_name from customers where customer_name like '%{0}%'", prefixText);

conn.Open();

OleDbDataReader dr = cmd.ExecuteReader();

List<string> result =new List<string>();

while (dr.Read())
result.Add(dr[0].ToString());

conn.Close();

return result.ToArray();
}

Please note, it isn't really representative of following database best practices. It should point you in the right direction though.

Thank you! Works good!


Just make sure you tidy up the database access if you're going to use this in production. That code is vulnerable to SQL injection, which is fairly bad when it's hooked up to a web service.

Saturday, March 24, 2012

Ajax and IE6 - IE7 runs very very slow... Firefox is fast

Hi guys... i just implementa site that uses ajax update panels.. one page have an ajax update panel with asimple post back data (in change index event of a drop down a record shows tothe user) quite simple!

BUT the problems startswhen i upload the site in a production server , every update panel runs veryvery slow with IE7 or IE6 but in firefox works like a charm..

I made the following changes just to know but NOTHING CHANGED...Tongue Tied

<compilation debug="false"><system.web.extensions> <scripting> <scriptResourceHandler enableCompression="true" enableCaching="true"/> </scripting></system.web.extensions> 


i set also the EnableViewState =false to several items inside the page but did'nt see any change in production server..

Help ME PLEASE!!!

hello.

hum...do you have an anti-virus on? are we talking about how much data inside the updatepanel?


no antivirus..

look..

i have an update panel that contains a dropdown box with 3 values

This dropdown is autopostback=true

Also inside the Update panel is a second DropDbox that is conected to a datasource that changes the where clause value from the 1st Ddownbox selected value..(the table contains indexes and there are 80 records ONLY)

is quite simple.. User chooses for example CARS , and the second dropdown manipulates cars brands .. chooses motorbikes ,the second dropdown manipulates bikes..
I do not understand why in firefox is quite fast and in IE7 is VERY very slow...

is it a matter of the production server? or is a general known problem of ajax asp.net with IE6,7?



is there anyone with the same situation?