Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POPUP PROBLEM

Status
Not open for further replies.

100dtl

Programmer
Aug 18, 2003
313
0
0
GB
Hi

I have a problem with a popup, I use

buStartDate_Click as the link id to open a calander event but once I close the calender, THEN do something else and click the back button the event of the calender opens again? can anyone help
 
Maybe Post Your code...people can sometimes get a better idea if you do that...
 
here u go. .this is called

private void buStartDate_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
try
{
System.DateTime.Parse(textboxFromDate.Text,new CultureInfo("en-GB"));
}
catch
{
//Invalid date set todays date for now
Response.Redirect("Default.aspx");
//DateTime Date = DateTime.Today;
//textboxFromDate.Text = Date.Day.ToString() + "/" + Date.Month.ToString() + "/" + Date.Year.ToString();
}

this.Controls.Add(new LiteralControl(&quot;<script>&quot;));
this.Controls.Add(new LiteralControl(&quot;document.all[\&quot;textboxFromDate\&quot;].value = window.showModalDialog('Calendar.htm',document.all[\&quot;textboxFromDate\&quot;].value, 'dialogLeft:500px;dialogTop:500px;dialogHeight:210px;dialogWidth:265px;center:No;help:No;scroll:No;resizable:No;status:No;')&quot;));
this.Controls.Add(new LiteralControl(&quot;</script>&quot;));
}
 
put a literal server control on your page and set it's EnableViewState Property to false. Then in your code just type the id of the literal.Text = all the stuff you have above

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Have you an example and where to put it? I'm a bit of a novice with .net
 
Just going to give a bit more detail, when the back button on the browser is pressed, the calender pops up again... does the EnableState go in the code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top