Click here to Skip to main content
15,890,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Multi Dimension-ArrayList in ASP.NET2.0 Pin
gauthee6-Feb-07 18:57
gauthee6-Feb-07 18:57 
GeneralRe: Multi Dimension-ArrayList in ASP.NET2.0 Pin
varshavmane6-Feb-07 19:52
varshavmane6-Feb-07 19:52 
QuestionPls help Pin
Ishwarya M6-Feb-07 17:01
Ishwarya M6-Feb-07 17:01 
AnswerRe: Pls help Pin
gauthee6-Feb-07 17:21
gauthee6-Feb-07 17:21 
QuestionError while trying to run project Pin
vurugonda6-Feb-07 16:23
vurugonda6-Feb-07 16:23 
AnswerRe: Error while trying to run project [modified] Pin
Sylvester george6-Feb-07 19:36
Sylvester george6-Feb-07 19:36 
AnswerRe: Error while trying to run project Pin
liyakhat_shahid6-Feb-07 22:46
liyakhat_shahid6-Feb-07 22:46 
QuestionPopUp Calendar problem Pin
SharonRao6-Feb-07 14:42
SharonRao6-Feb-07 14:42 
Hello Everyone,

I have made a webform in asp.net 2005 with a calendar control, please see below for code. I have another webpage with hyperlink to popupcalendar page. The problem is the second page has a masterpage and when i click the hyperlink the popupcalendar is displayed but the date selected is not being transferred to the text box in the second page, It works fine if i remove the master page link from the second page, any ideas guys whats happening here.

HTML CODE - Popup Calendar:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="KMAttendance.PopUp" CodeFile="PopUp.aspx.vb" %>



<title>PopUp







<asp:calendar id="calDate" onselectionchanged="Change_Date" runat="server" borderwidth="1px" backcolor="White"
="" width="220px" daynameformat="FirstLetter" forecolor="#003399" height="200px" font-size="8pt" font-names="Verdana" bordercolor="#3366CC" cellpadding="1">
<todaydaystyle forecolor="White" backcolor="#99CCCC">
<selectorstyle forecolor="#336666" backcolor="#99CCCC">
<nextprevstyle font-size="8pt" forecolor="#CCCCFF">
<dayheaderstyle height="1px" forecolor="#336666" backcolor="#99CCCC">
<selecteddaystyle font-bold="True" forecolor="#CCFF99" backcolor="#009999">
<titlestyle font-size="10pt" font-bold="True" height="25px" borderwidth="1px" forecolor="#CCCCFF"
="" borderstyle="Solid" bordercolor="#3366CC" backcolor="#003399">
<weekenddaystyle backcolor="#CCCCFF">
<othermonthdaystyle forecolor="#999999">

 




VB CODE-popup calendar:

Imports System.Web.UI.HtmlControls.HtmlGenericControl

Namespace KMAttendance
Partial Class PopUp
Inherits System.Web.UI.Page


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'control.Value = Request("textbox")
control.Value = Request.QueryString("textbox")
End Sub

Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim strScript As String = "window.opener.document.forms(0)." + Request.QueryString("textbox").ToString() + ".value = '"
'strScript += calDate.SelectedDate.ToString("dd/MM/yyyy")
strScript += calDate.SelectedDate.ToLongDateString
strScript += "';self.close()"
strScript += "</" + "script>"
RegisterClientScriptBlock("Calendar_ChangeDate", strScript)
'Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "anything", strScript, True)
End Sub

Private Sub InitializeComponent()

End Sub

End Class

End Namespace

HTML Code-Second Webpage
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="NoUpdate.aspx.vb" Inherits="KMAttendance.NoUpdate" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table border="0" align="Left" cellpadding="0" cellspacing="4" bordercolordark="silver" style="width: 456px; height: 16px">
<tr> <td align="center" style="height: 19px; width: 61px;"> </td> <td align="Left" style="height: 19px; width: 103px;"> &nbsp;<table style="width: 286px; height: 57px">
<tr> <td style="width: 25px; height: 21px;"> <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/error.png" Width="20px" Height="19px" /></td> <td style="height: 21px"> <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Access Denied" Width="167px"></asp:Label></td> <td style="height: 21px"> &nbsp;</td> </tr> <tr> <td style="width: 25px; height: 21px"> <A onclick="window.open('popup.aspx?textbox=txtStartDate','cal','width=250,height=225,left=270,top=180')" href="javascript:;"><IMG src="Images/calendar.png" border="0"></A>
</td> <td style="height: 21px"> <asp:textbox id="txtStartDate" runat="server" width="106px" Height="12px"></asp:textbox></td> <td style="height: 21px"> </td> </tr> <tr> <td style="width: 25px"> </td> <td> </td> <td> </td> </tr> </table>
</td> </tr> </table>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
</asp:Content>

<div class="ForumSig">Thanks in Advance for your help. Best Regards</div>
AnswerRe: PopUp Calendar problem Pin
Jay_se6-Feb-07 17:35
Jay_se6-Feb-07 17:35 
GeneralRe: PopUp Calendar problem Pin
SharonRao8-Feb-07 11:23
SharonRao8-Feb-07 11:23 
QuestionEditing server-side Excel s/sheet in ASP.Net 2.0 Page - how? Pin
nzmike6-Feb-07 14:01
nzmike6-Feb-07 14:01 
AnswerRe: Editing server-side Excel s/sheet in ASP.Net 2.0 Page - how? Pin
minhpc_bk7-Feb-07 0:34
minhpc_bk7-Feb-07 0:34 
Questioncreating web form Pin
xoxoxoxoxoxox6-Feb-07 13:30
xoxoxoxoxoxox6-Feb-07 13:30 
QuestionGridView? Pin
Murthy Puvvada6-Feb-07 11:13
Murthy Puvvada6-Feb-07 11:13 
AnswerRe: GridView? Pin
varshavmane6-Feb-07 17:47
varshavmane6-Feb-07 17:47 
GeneralRe: GridView? Pin
Murthy Puvvada7-Feb-07 2:02
Murthy Puvvada7-Feb-07 2:02 
AnswerRe: GridView? Pin
gauthee6-Feb-07 18:59
gauthee6-Feb-07 18:59 
GeneralRe: GridView? Pin
Murthy Puvvada7-Feb-07 1:54
Murthy Puvvada7-Feb-07 1:54 
QuestionChecking if the item exists in a combox?? Pin
Nada Adel6-Feb-07 8:48
Nada Adel6-Feb-07 8:48 
AnswerRe: Checking if the item exists in a combox?? Pin
Christian Graus6-Feb-07 13:34
protectorChristian Graus6-Feb-07 13:34 
AnswerRe: Checking if the item exists in a combox?? Pin
Vsree6-Feb-07 18:37
Vsree6-Feb-07 18:37 
QuestionAll Web controls must be placed within a &lt;form runat="server"> tag to function properly. Pin
elane6-Feb-07 8:12
elane6-Feb-07 8:12 
AnswerRe: All Web controls must be placed within a &lt;form runat="server"> tag to function properly. Pin
Pradipta Basu6-Feb-07 8:21
Pradipta Basu6-Feb-07 8:21 
AnswerRe: All Web controls must be placed within a &amp;lt;form runat=&quot;server&quot;&gt; tag to function properly. Pin
Guffa6-Feb-07 10:00
Guffa6-Feb-07 10:00 
QuestionHow to Use ajax control toolkit with asp.net1.1 Pin
suriee6-Feb-07 7:11
suriee6-Feb-07 7:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.