whats wrong with document.yourformnamehere.submit() ?
--- In [email protected], shahid akhtar <[EMAIL PROTECTED]> wrote: > > hi > > shahid here it may be suitable for u > > call this form on page load of u r form > > add this > > btnStartDate.Attributes.Add("onclick", "Javascript:calendar_window=window.open('Calendar.aspx?formname=Form1.txtStartDate','calendar_window','width=212,height=198');calendar_window.focus()"); > > > > --------------------------------- > Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! > http://in.mail.yahoo.com > ---------- > > using System; > using System.Collections; > using System.ComponentModel; > using System.Data; > using System.Drawing; > using System.Web; > using System.Web.SessionState; > using System.Web.UI; > using System.Web.UI.WebControls; > using System.Web.UI.HtmlControls; > > namespace StatusDate > { > /// <summary> > /// This Class Is Used To Display Calendar. > /// </summary> > public class Calendar : System.Web.UI.Page > { > protected System.Web.UI.WebControls.Literal Literal1; > protected System.Web.UI.WebControls.Calendar calMeeting; > > private void Page_Load(object sender, System.EventArgs e) > { > calMeeting.Attributes.Add("SelectionChanged","window.returnValue='" + calMeeting.SelectedDate.ToShortDateString() + "'; window.close();"); > } > > > #region Web Form Designer generated code > override protected void OnInit(EventArgs e) > { > calMeeting.SelectionChanged += new EventHandler(calMeeting_SelectionChanged); > // > // CODEGEN: This call is required by the ASP.NET Web > Form Designer. > // > InitializeComponent(); > base.OnInit(e); > } > > /// <summary> > /// Required method for Designer support - do not modify > /// the contents of this method with the code editor. > /// </summary> > private void InitializeComponent() > { > this.calMeeting.SelectionChanged += new System.EventHandler(this.calMeeting_SelectionChanged); > this.Load += new System.EventHandler(this.Page_Load); > > } > #endregion > > /// <summary> > /// This Function Is To PickUp The Date. > /// </summary> > /// <param name="sender"></param> > /// <param name="e"></param> > void calMeeting_SelectionChanged(Object sender, > System.EventArgs e) > { > string strjscript = "<script language='javascript'>"; > strjscript += "window.opener." + HttpContext.Current.Request.QueryString["formname"]; > strjscript += ".value = '" + calMeeting.SelectedDate.ToString("d") + "';window.close();"; > strjscript += "</script" + ">"; //Don't ask, tool bug. > Literal1.Text = strjscript; > } > > } > } > > > [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
