Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Object reference not set to an instance of an object Pin
Rhys Gravell11-Jul-07 20:21
professionalRhys Gravell11-Jul-07 20:21 
AnswerRe: Object reference not set to an instance of an object Pin
Pete O'Hanlon12-Jul-07 2:18
mvePete O'Hanlon12-Jul-07 2:18 
Questiongridview slow Pin
VickyC#11-Jul-07 14:48
VickyC#11-Jul-07 14:48 
AnswerRe: gridview slow Pin
Christian Graus11-Jul-07 14:55
protectorChristian Graus11-Jul-07 14:55 
GeneralRe: gridview slow Pin
VickyC#12-Jul-07 3:28
VickyC#12-Jul-07 3:28 
Questionasp.net 2.0 vb.net Index Server Pin
Michael Clinton11-Jul-07 12:44
Michael Clinton11-Jul-07 12:44 
AnswerRe: asp.net 2.0 vb.net Index Server Pin
Michael Clinton13-Jul-07 12:35
Michael Clinton13-Jul-07 12:35 
QuestionCalender Pop Up and master Page Problem Pin
kidus111-Jul-07 11:33
kidus111-Jul-07 11:33 
am using visual studio 2005 and I am trying to create a popup calender so
when a user click on a image on the main form, a calender will then popup,
the user will select a date and the date will then be passed back to the main
form and populate a textbox. it works fine. but when i used master page for
all my pages and i put the textbox inside the content , the calender pops up
but when i select the date nothing happens .. the textbox was not populated
with the selected date from the calender and the window was not closed.

Here is my code

Default Page/Parent Window/


function GetDate(CtrlName)
{
ChildWindow = window.open('Calendar.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName, "PopUpCalendar", "width=270,height=300,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no");
}




<asp:textbox id="txtStartDate" runat="server">
Start Date



Code for the Calendar Page/Child Page/


<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">


function ReturnDate()
{

window.opener.document.forms["<%= strFormName %>"].elements["<%=strCtrlName %>"].value = "<%= strSelectedDate %>";
window.close();
}

function Close()

{
window.close();
}





Public strFormName As String
Public strCtrlName As String
Public strSelectedDate As String

Sub Page_Load(Sender As Object, E As EventArgs)

If Not IsPostBack Then
myCalendar.SelectedDate = System.DateTime.Now()
End If

strSelectedDate = myCalendar.SelectedDate.ToString("dd/MM/yyyy")
strFormName = Request.QueryString("FormName")
strCtrlName = Request.QueryString("CtrlName")

End Sub

Sub myCalendar_SelectionChanged(sender As Object, e As EventArgs)
strSelectedDate = myCalendar.SelectedDate.ToString("dd/MM/yyyy")

End Sub
</script
<asp:Calendar id="myCalendar" runat="server" OnSelectionChanged="myCalendar_SelectionChanged">
</asp:Calendar>

<input id="btnReturnDate" onclick="Javascript:ReturnDate()" type="button" value="Select" runat="Server" />
<input id="btnCloseWindow" onclick="Javascript:Close()" type="button" value="Close" runat="Server" />


</asp:Content>
I need help


kidus
AnswerRe: Calender Pop Up and master Page Problem Pin
kjosh11-Jul-07 11:46
kjosh11-Jul-07 11:46 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus111-Jul-07 11:52
kidus111-Jul-07 11:52 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus111-Jul-07 11:53
kidus111-Jul-07 11:53 
GeneralRe: Calender Pop Up and master Page Problem Pin
kjosh11-Jul-07 12:10
kjosh11-Jul-07 12:10 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus112-Jul-07 2:11
kidus112-Jul-07 2:11 
GeneralRe: Calender Pop Up and master Page Problem Pin
Member 186252323-Aug-08 22:55
Member 186252323-Aug-08 22:55 
QuestionMapping database fileds Pin
patelash0111-Jul-07 10:21
patelash0111-Jul-07 10:21 
AnswerRe: Mapping database fileds Pin
Paul Conrad13-Jul-07 12:19
professionalPaul Conrad13-Jul-07 12:19 
Questionhash and salt Pin
boyindie11-Jul-07 8:58
boyindie11-Jul-07 8:58 
AnswerBAD USER! Pin
leckey11-Jul-07 9:16
leckey11-Jul-07 9:16 
AnswerRe: hash and salt Pin
Dave Kreskowiak11-Jul-07 9:28
mveDave Kreskowiak11-Jul-07 9:28 
GeneralRe: hash and salt Pin
boyindie11-Jul-07 22:38
boyindie11-Jul-07 22:38 
GeneralRe: hash and salt Pin
Dave Kreskowiak12-Jul-07 1:41
mveDave Kreskowiak12-Jul-07 1:41 
AnswerRe: hash and salt Pin
Pete O'Hanlon11-Jul-07 10:27
mvePete O'Hanlon11-Jul-07 10:27 
GeneralRe: hash and salt Pin
leckey11-Jul-07 15:00
leckey11-Jul-07 15:00 
GeneralRe: hash and salt Pin
Sathesh Sakthivel11-Jul-07 17:58
Sathesh Sakthivel11-Jul-07 17:58 
QuestionChart Refresh Problem Pin
Hyland Computer Systems11-Jul-07 8:10
Hyland Computer Systems11-Jul-07 8:10 

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.