HI guys
    I've made a simple example:
c#file:
namespace test
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            AjaxPro.Utility.RegisterTypeForAjax(typeof(test._Default));
        }
        [AjaxPro.AjaxMethod]
    public System.Data.DataSet getdata(){
    SqlConnection conn = new
System.Data.SqlClient.SqlConnection(ConfigurationSettings.AppSettings["ConnStr"]);
            try
            {

                conn.Open();
            }
            catch (Exception e)
            {
                Response.Write(e);

            }


  string select;
   select = "select top 2 PID from products";
  SqlCommand cmd = new SqlCommand(select, conn);
   SqlDataAdapter sda = new SqlDataAdapter(cmd);


   DataSet ds = new DataSet();
sda.Fill(ds);

return ds;

        }

=======================================================
//Aspx file:
function getdata(){
        test._Default.getdata(call);

        }
function call(res){
   **********************************
how to display  res.value in a winform like asp:datalist control

********************************************
}
Regards
     Lee


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---

Reply via email to