Hi,
I have used this type of coding in [1.0]Coolite. If there is any simplification please help me out.
aspx file
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="stylesheet" type="text/css" href="js/Rater.css" />
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server">
</ext:ResourcePlaceHolder>
<script type="text/javascript" src="js/Rater.js"></script>
<script type="text/javascript" src="js/ext-rater.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var r3 = new Ext.ux.form.Rater({ displayValue: 6, maxValue: 8, fieldLabel: "Star" });
r3.on('rate', function() {
Ext.getCmp("Hidden1").setValue(this.getValue());
});
var simple = Ext.getCmp("FormPanel1");
simple.add(
r3
);
});
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:FormPanel ID="FormPanel1" runat="server" ButtonAlign="Right" Height="185" Padding="5"
Title="Title" Width="300">
<Items>
<ext:TextField ID="TextField1" runat="server" AnchorHorizontal="100%" FieldLabel="Label">
</ext:TextField>
</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" Icon="Disk" Text="Submit">
<DirectEvents>
<Click OnEvent="test"></Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:FormPanel>
<ext:Hidden ID="Hidden1" runat="server" >
</ext:Hidden>
</form>
</body>
</html>
C# file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
}
}
public void test(object sender, DirectEventArgs e)
{
var f = Hidden1.Value;
}
}
Thank you,
Regards,
Madan