Sunday, August 18, 2013

Chat Window

 <a ,'title='<%# Eval("r_login") %>)&#039;;"' href="#"
                                onclick='window.open(&#039;Privatechat.aspx?uid=<%=Session["uid"]%>&amp;u=<%# Eval("r_login") %>&amp;frid=<%#Eval("r_login")%>&#039;,&#039;mywindow<%=Session["uid"]%>&#039;,&#039;toolbars=no,menubar=no,scrollbars=no,minimize=true,height=300,width=300,left=200,top=600&#039;);'><%# Eval("r_login") %>
                            </a>

Change Row Color according to data

 string select = "select * from tb_team where owner_id=" + Convert.ToInt32(Session["ownerid"]) + "";
        DataTable dt = obj.GetDataTable(select);
        if (dt.Rows.Count > 0)
        {
            teamname = dt.Rows[0]["team_name"].ToString();
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string team1 = (string)DataBinder.Eval(e.Row.DataItem, "teamName1");
            string team2 = (string)DataBinder.Eval(e.Row.DataItem, "teamName2");
            if (team1 == teamname || team2 == teamname)
            {
                e.Row.BackColor = System.Drawing.Color.LightBlue;
            }
        }

Calender-Ajax

<ajaxToolkit:Calendar runat="server"
    TargetControlID="Date1"
    CssClass="ClassName"
    Format="MMMM d, yyyy"
    PopupButtonID="Image1" />


Calander theme:

.MyCalendar .ajax__calendar_container {
    border:1px solid #646464;
    background-color: lemonchiffon;
    color: red;
}

Way to call a webservice

make an asp.net webservice   and write functions(eg:  sum(int a,int b) ) in it.

then run the project,,copy url in browser .

then create a new asp.net website...add webreference and copy paste the URL which was copied.

give a name(eg: webnew) to webservice..

then make an object of webservice such that....eg:  webnew.Service obj=new webnew.Service();


call function when necessary   such that....eg:   obj.sum();