If any one know How to use Java Scripts in C#?
pls send me with examples.
Thanks&Regs
Magesh
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
magesh manavalanPosted Mar 5, 2012, 1:13 AM
Satyapriya NayakPosted Mar 5, 2012, 1:07 AM
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication9.WebForm2" %>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Drawing;
namespace WebApplication9
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.DayNumberText.ToString() == "18")
{
e.Cell.Attributes.Add("onclick", "javascript:alert('Today date is meeting day')");
e.Cell.ForeColor = Color.Red;
}
if (e.Day.DayNumberText.ToString() == "20")
{
e.Cell.Attributes.Add("onclick", "javascript:alert('Today date is appointment day')");
e.Cell.ForeColor = Color.Green;
}
}
}
}
Thanks