|
Hi,
Store it in a Session and access it.
Storing
Session["MyDate"] = txtDate.Text;
Accessing
if(Session["MyDate"]!= null)
{
txtNext.Text = Session["MyDate"].ToString();
}
Key Note: Session is per user, so that this will be there with in the site as long as you are using the site and it can be accessed from any page.
Thx,
Gayani
|
|
|
|
|
Thank you Gayani,
Thanks for your response but it is not working incase of ajax calendar control......from past one week I am trying with this but not working.....
Thanking you
Mcmilan
|
|
|
|
|
Hi Mcmilan,
Shall we see whether the Ajax Calendar control passes the selected date to the Target Control?
Just try this and see.....
Here im going to use two pages. Page one will have a Calender control, text box and a button.
The date you select from the calendar control will be displayed in the text box and the button will redirect you to the page two.
[SamplePageOne.aspx]
<asp:ScriptManager ID="smTestSample" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1">
</cc1:CalendarExtender>
<asp:Button ID="Button1" runat="server" Text="Go to Next Page" OnClick="Button1_Click" />
[SamplePageOne.aspx.cs]
protected void Button1_Click(object sender, EventArgs e)
{
Session["MyDate"] = TextBox1.Text;
Response.Redirect("SamplePageTwo.aspx");
}
In the page two I will check if the session is null, and if not I wil write the value to the second page.
[SamplePageTwo.aspx.cs]
protected void Page_Load(object sender, EventArgs e)
{
if (Session["MyDate"] != null)
{
Response.Write(Session["MyDate"].ToString());
}
}
Hope it helps you,
Thanks,
Gayani
|
|
|
|
|
You can also try passing it using the query string.
Brian McHugh
|
|
|
|
|
Hi,
I am using window.open() to open a new popup window when I click a Button...It is working fine.......
My requirement is I want to pass a textbox value in window.open() and access in the next page.....
Thanking you
Mcmilan.
|
|
|
|
|
mcmilan wrote: My requirement is I want to pass a textbox value in window.open() and access in the next page.....
//You can retrive parent page text box value in child page
//Suppose I have one text box in parent page with ID 'txtParentID'
//and other textbox in child page with ID 'txtChildID
//now you can get parent TextBox value into child textbox by using this script
function getValue()
{
document.getElementById('txtChildID').value=opener.document.getElementById('txtParentID').value;
}
// call this script on body onload event in child page
please don't forget to vote on the post that helped you.
|
|
|
|
|
you can pass query string to the popup window, then use the values on the pop up window
window.open(mynewwindow.aspx?newval=val&secondVal=val2....)
Yusuf
|
|
|
|
|
Hi ,
I am using window.close() to close the browser when I click the Button on my webpage.....It is working with InternentExplorer but not working with MozillaFireFox......Please help me........
Thanking you
McMilan.
|
|
|
|
|
mcmilan wrote: I am using window.close() to close the browser when I click the Button on my webpage.....It is working with InternentExplorer but not working with MozillaFireFox......Please help me........
Post your code
please don't forget to vote on the post that helped you.
|
|
|
|
|
|
Hi Imran,
I tried with the following code:
1. Response.write(' {window.close();}');
2. " " " self.parent.close()
3. <asp:button ..........onclick="javascript:window.close()" xmlns:asp="#unknown">
Above all are working in Internet explore but not in Mozilla Firefox...
Thanking you
Mcmilan.
|
|
|
|
|
mcmilan wrote: Above all are working in Internet explore but not in Mozilla Firefox...
Does it is parent window?
if YES then you can not close it in Mozilla but if it is popup window then this code will work
Regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
How do i calculate the Start_cell_number and end_cell_number from Start_Display_datetime and end_display_datetime calcultion.
here is my code .
TimeSpan timeSpan1 = TimeSpan.Parse("8:00");//8:00 AM Start_dispaly_dateitme
TimeSpan timeSpan2 = TimeSpan.Parse("9:00");// 9:00 AM end_display_datetime
TimeSpan timeSpanDiff = timeSpan2.Subtract(timeSpan1);//hours difference
int mins = timeSpanDiff.Hours * 60 + timeSpanDiff.Minutes;//total minutes
int cells = mins / 15;//count number of cells
Now how i calculate the Start_cell_number and end_cell _number ?
first cell contains name of machines and from second cell i have to calculate .
i have 32 cells in a row .
Any hint is highly apperciated.
Best regards
Rameez
|
|
|
|
|
Nobody is going to answer you unless you give a clear picture.
Your question is 100% empty.
What you mean by,
rameez Raja wrote: Start_Display_datetime
rameez Raja wrote: end_display_datetime
rameez Raja wrote: Start_cell_number
rameez Raja wrote: end_cell_number
What type of cell it is?
Can you please explain your exact problem?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Thanks for ur reply .
Dear i have one table which contains 32 row cells. from 8:00AM to 3:00PM with interval of 15 minutes .
start from 8:00AM to 03:00PM each hour contains four cells.
i have reservation from 8:00AM to 10:00AM
like this
startReservetime
TimeSpan timeSpan1 = TimeSpan.Parse("8:00");//8:00 AM Startdatetime
TimeSpan timeSpan2 = TimeSpan.Parse("9:00");//3:00 PM end_display_datetime
TimeSpan timeSpanDiff = timeSpan2.Subtract(timeSpan1);//hours difference
int mins = timeSpanDiff.Hours * 60 + timeSpanDiff.Minutes;//total minutes
int cells = mins / 15;//count number of cells
same way i calculated endreservetime
Now i want to figure out the start_cell_number and end_cell_number of reserved vehicle as i can colour the cells .
please give me hint how i do that .
Best regards
Rameez
modified on Thursday, July 17, 2008 8:31 AM
|
|
|
|
|
Hi,
I am having a string with html tags. When I try to display it on the browser it comes along with those tags. I want to display only string with out html tags.
Please give me a solution.
VJ
|
|
|
|
|
tovijay.shukla wrote: When I try to display it on the browser it comes along with those tags
In which control are your trying to display that text?
tovijay.shukla wrote: I want to display only string with out html tags.
You can take DIV control or Label also
please don't forget to vote on the post that helped you.
|
|
|
|
|
Are you using those string inside a GridView? If yes, you should use HTMLEncode property of the GridViewColumn to display it properly. Use the "Edit Column" option in the Smart Tag in design mode
|
|
|
|
|
No I am just displaying it in a repeater.
|
|
|
|
|
Got the solution. Server.HtmlDecode can Decode the same
Thanks,
|
|
|
|
|
tovijay.shukla wrote: Got the solution. Server.HtmlDecode can Decode the same
You did mark my previous post as bad answer but that was not my mistake.It was your mistake if you can not explain you question clearly so nobody can give you perfect solution.Remember if you do not understand answer,do not mark answer as unhelpful.
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi, I am newbie and I came across with several email validation sample codes by using socket programing. I followed the instruction and the sample codes but I failed to connect to the socket either..pls help~
I was stucked at:
public static bool validate(string e_mail) <--- e_mail input as "support@microsoft.com"
{
string[] tex1 = e_mail.Split(new char[] { '@' });
IPHostEntry IPhst = Dns.GetHostEntry(tex1[1]);
IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 26);
Socket s = new Socket(endPt.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
s.Connect(endPt); <---- error here
....
....
}
I am using port 26 as my ISP provider is blocking my port 25..
I got this returned :"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 207.46.197.32:26"
Please help~~Thank you.
Lengdor
|
|
|
|
|
i need to allow our users to select 6 items from a larger list. i want to implement ajax. but i'am new to it.
i dont want to use lists exactly. what i need is that the items will be displayed as images. i want the user to drag from the larger list to the list he prefers. also i might want the user to re arrange the list he has created.
I have no idea of how ajax works.
i would appreciate if anyone can give me suggestions
Balaji
|
|
|
|
|
I would start here
http://www.asp.net/ajax/
then download this:
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/
|
|
|
|
|
What is wrong with this post?
|
|
|
|