none
how to Call web service from JavaScript in localhost

    Question

  • Hello to All

    My is calling Web services functions from javascript when i add from localhost.
    I am using ASP.Net 3.5 and after creating web service and making directory in IIS when i use in Project then it adds fine with project and well use in .cs means code behind class using namespace localhost.service.

    but i want to know how use web services functions from javascripts.  have seen some articles from net but they talking about htc file and i nothing know about that htc file means how to use and how to generate it.

    same case with WCF services also.

    I am using window XP SP2 and its IIS


    and I have second problem with Gridview.
    on Pgae load i make

     

    string sql = "Select * from customers";

     

    SqlDataAdapter da = new SqlDataAdapter(sql,conn);

     

    DataTable dt = new DataTable();

    da.Fill(dt);

    GridView1.DataSource = dt;

    GridView1.DataBind();

    and after that this RowDataBound but in that case gridview.rows.count always 0 while my datatable through have 2 rows so RowDataBound create problems

     

     

    protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)

    {

     

    if (e.Row.RowType == DataControlRowType.DataRow)

    {

     

    HyperLink Hyper = (HyperLink)e.Row.FindControl("HyperLink1");

    Hyper.Attributes.Add(

    "onclick", "ShowMyModalPopup('" + GridView1.DataKeys[e.Row.RowIndex].Value + "')");

    }

    }


    please help me out from this

    I shall be thankful to you

    Thankx in advance
    Mahender

    • Moved by YiChun Chen Tuesday, August 25, 2009 6:50 AM It's off topic here. (From:.NET Framework Setup)
    Sunday, August 23, 2009 4:14 AM

Answers

  • Hi Mahender,

    This forum is for the support of .NET Framework installation. Since your issue is related to ASP.NET, you could post your thread on ASP.NET Forum. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Tuesday, August 25, 2009 6:50 AM
    Tuesday, August 25, 2009 6:49 AM