Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: how to use tigra calendar in asp.net web forms with master page ?
rangaraj
Junior Member

Posts: 2
Registered: 2/7/2007
Location: india
Member Is Offline
posted on 2/7/2007 at 04:52 AM Reply With Quote
how to use tigra calendar in asp.net web forms with master page ?


when using the asp.net in calendar ( web form with master page )

can't working

code for ,

master page (Masterpage.Master)
----------------

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>


<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">

<title>calendar</title>

<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />

<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1" />

<meta name="vs_defaultClientScript" content="JavaScript" />

<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />

<script language="JavaScript" src="calendar2.js" type ="text/javascript" ></script>

</head>

<body>

<form id="Form1" method="post" runat="server">

<table >

<tr><td width= 700 bgcolor="#ffffcc">

<div>

<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

</asp:contentplaceholder>

</div>

</td></tr></table>

</form>

<script language="javascript" type ="text/javascript" >

var cal1 = new calendar2(document.forms['Form1'].TextBox1);

</script>

</body>

</html>


web form with master page ( newform.aspx)
--------------------------------------------------------

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="newform.aspx.vb" Inherits="newform" MasterPageFile ="~/MasterPage.master"%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<table><tr><td>
<input id="Text1" type="text" name="Message" runat="server" />

<input id="Button1" name="TextBox1" type="button" runat="server" value="ClickMe" onclick="DoClick()" />
</td></tr></table>

</asp:Content>


codebehined
----------------

Partial Class newform
Inherits System.Web.UI.Page


Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

Dim csname As String = "ButtonClickScript"
Dim cstype As Type = Me.GetType
Dim cs As ClientScriptManager = Page.ClientScript
If Not cs.IsClientScriptBlockRegistered(cstype, csname) Then
Dim cstext2 As StringBuilder = New StringBuilder
cstext2.Append("<script type='text/javascript'> function DoClick(){")
cstext2.Append("document.forms[0].Message.value='Text from client script.'} </")
cstext2.Append("script>")
cs.RegisterClientScriptBlock(cstype, csname, cstext2.ToString, False)
End If
End Sub
End Class

it cannot be working

error
-----

Object Expected


Any help...

Thanks in advance...
View User's Profile View All Posts By User U2U Member
rangaraj
Junior Member

Posts: 2
Registered: 2/7/2007
Location: india
Member Is Offline
posted on 2/11/2007 at 10:21 PM Reply With Quote
Master page web from with tigra calendar - solution


master.master (asp.net 2.0 ) visual studio 2005
------------------------------------------------------------

<%@ master language="VB" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>
<%--<asp:contentplaceholder id="_titleContent" runat="server">Main page</asp:contentplaceholder>--%>
</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1" />
<meta name="vs_defaultClientScript" content="JavaScript" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<link type="text/css" rel="stylesheet" href="StyleSheet.css" />
</head>
<body style ="margin-top :0;margin-left :0">
<form id="Form1" runat ="server" style ="width :100%">
<div style="text-align: left">
<table style="width: 100%; height: 100%; font-family: Tahoma;">
<tr>
<td align="left" colspan="2" rowspan="1" style="background-color: #095f8c" valign="top">
<uch:header ID="Header1" runat="server" EnableTheming="true" Visible="true" />
</td>
</tr>
<tr>
<td align="left" colspan="2" rowspan="1" style="background-color: #095f8c;" valign="top">
<uc1:Links ID="Links1" runat="server" EnableTheming="true" Visible="true" OnLoad="Links1_Load" />
</td>
</tr>
<tr>
<td align="left" style="width: 416px; height: 100%; background-color: white" valign="top">
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
</td>
<td align="left" style="width: 80%; height: 100%; background-color: white" valign="top">
<asp:contentplaceholder runat="server" id="_mainContent">
</asp:contentplaceholder>
&nbsp;
</td>
</tr>
<tr>
<td align="left" valign="top" style="width: 416px;">
</td>
<td align="left" valign="top" style="height: 2%; width: 100%;">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

web form
------------

<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ProjectPlan.aspx.vb" Inherits="ProjectPlan" title="Untitled Page"%>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="_mainContent" Runat="Server">
<script type ="text/javascript" language ="javascript" src ="calendar2.js"></script>
<script type ="text/javascript" language ="javascript" >
function GetStartDate()
{
var cal1 = new calendar2(document.getElementById("ctl00__mainContent_txt_commence_date"));
cal1.popup();
}
</script>
<div style="text-align: left">

<asp:TextBox ID="txt_commence_date" runat="server" ReadOnly="True" EnableViewState ="true" ></asp:TextBox><br />
<a href="javascript:GetStartDate();">
<img src="images/icon-calendar.gif" id="IMGCal1" alt ="Select Date" />
</a>
</div>
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004