469,955 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

calender in modal window

i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back to
the parent form. I'm having an issue with this. When I select a date, i keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i get
the error. I need this in C#

Nov 18 '05 #1
6 1756
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back
to
the parent form. I'm having an issue with this. When I select a date, i
keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i
get
the error. I need this in C#

Nov 18 '05 #2
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back
to
the parent form. I'm having an issue with this. When I select a date, i
keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i
get
the error. I need this in C#


Nov 18 '05 #3
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
>i have a button that opens a modal window which has the calender control
>in
> it. I allow the user to select a date then that date should be passed
> back
> to
> the parent form. I'm having an issue with this. When I select a date, i
> keep
> getting a JavaScript error and i debug it and it goes to this line:
>
> __doPostBack('ctlCalender','1781').
>
>
>
> i can get this working in VB.NET so i converted the code over and now i
> get
> the error. I need this in C#
>


Nov 18 '05 #4
the vb.net code: on my modal windowL

page_load
if not isPostBack then
calendar.selectedDate = Date.Now
end if
Session("myDay") = format(calendar.selectedDate, "MM/dd")

sub calendar_selectedChanged
if calendar.selectedMode = CalendarSelectionMode.Day then
Session("myDay") = format(calendar.selectedDate, "MM/dd")
end if

"Curt_C [MVP]" wrote:
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
>i have a button that opens a modal window which has the calender control
>in
> it. I allow the user to select a date then that date should be passed
> back
> to
> the parent form. I'm having an issue with this. When I select a date, i
> keep
> getting a JavaScript error and i debug it and it goes to this line:
>
> __doPostBack('ctlCalender','1781').
>
>
>
> i can get this working in VB.NET so i converted the code over and now i
> get
> the error. I need this in C#
>


Nov 18 '05 #5
Not fully tested but is this close to what you had?

page_load
if(!IsPostBack)
{
calendar.SelectedDate = Date.Now;
}
Session["myDay"] = Convert.ToDateTime(calendar.SelectedDate).ToShortD ate();

sub calendar_selectedChanged
if(calendar.SelectedMode = CalendarSelectionMode.Day)
{
Session["myDay"] =
Convert.ToDateTime(calendar.SelectedDate).ToShortD ate();
}
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
the vb.net code: on my modal windowL

page_load
if not isPostBack then
calendar.selectedDate = Date.Now
end if
Session("myDay") = format(calendar.selectedDate, "MM/dd")

sub calendar_selectedChanged
if calendar.selectedMode = CalendarSelectionMode.Day then
Session("myDay") = format(calendar.selectedDate, "MM/dd")
end if

"Curt_C [MVP]" wrote:
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
> that didn't work either. I did try it on the same page and it worked.
> Its
> something with either the new window, or the session variable really
> isn't
> being "saved" for some reason
>
> "Curt_C [MVP]" wrote:
>
>> Try it as a non-modal window once... does it work?
>>
>> --
>> Curt Christianson
>> Owner/Lead Developer, DF-Software
>> Site: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Mike" <Mi**@discussions.microsoft.com> wrote in message
>> news:B3**********************************@microsof t.com...
>> >i have a button that opens a modal window which has the calender
>> >control
>> >in
>> > it. I allow the user to select a date then that date should be
>> > passed
>> > back
>> > to
>> > the parent form. I'm having an issue with this. When I select a
>> > date, i
>> > keep
>> > getting a JavaScript error and i debug it and it goes to this line:
>> >
>> > __doPostBack('ctlCalender','1781').
>> >
>> >
>> >
>> > i can get this working in VB.NET so i converted the code over and
>> > now i
>> > get
>> > the error. I need this in C#
>> >
>>
>>
>>


Nov 18 '05 #6
Try calendar at http://www.obout.com
it is instant. no popup window
works right out of the box
looks great
Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Patrick Lim | last post: by
1 post views Thread by amith | last post: by
8 posts views Thread by PerryC | last post: by
4 posts views Thread by Chris | last post: by
2 posts views Thread by sthrudel | last post: by
4 posts views Thread by John Kotuby | last post: by
7 posts views Thread by gubbachchi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.