If any one know How to use Java Scripts in C#?
pls send me with examples.
Thanks&Regs
Magesh
How to use Java Scripts in C#?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Mar 4, 2012, 8:07 PM EST
<%@ 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
magesh manavalanRank #6,279 · 271 reputationPosted Mar 4, 2012, 8:13 PM EST