|
try not to double post the same question. Many people will get turned off by doing such thing.
Yusuf
|
|
|
|
|
Plz read both questions carefully...writing style is same but both question are totally diffrent
|
|
|
|
|
Hi,
I am new in ASP.NET so I don't know how & what to write code for :
I have parent form from there child form pop-up i'll enter some data and click submit button(which is on child form). As soon as I click that button the child form will get closed and parent form should get refreshed.
Plz help me....for writing code for this application.
Thanks in advance
|
|
|
|
|
when the child form is closed, redirect to the parent form. This will force a refresh.
Yusuf
|
|
|
|
|
|
hi.
i have a page that contains a few textboxes and a "textarea" .
i have a command button that fires his "click_event" on postback.
on that event i collect all the text in the textboxes and insert them into a database.
now. the "text area" functions as an "htmleditor" via javascript.
i collect all the text generated by the textarea into a javascript variable. i want to include the text in that variable on my postback so that i could insert him to the database along with all the other textboxes.
|
|
|
|
|
You can store the JS variable value into a asp.net hidden field, Then retrieve the value from the hidden.
JS
document.getElementById('HiddenVarId').value=JS_Value;
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
if i create an html tag with "runat=server" , javascript wont recognize it.
|
|
|
|
|
document.getElementById("<%=ServerControlid.clientID%>").value=JS_Value;
|
|
|
|
|
Thanks for the help
|
|
|
|
|
Hi,
I am picking the date from Ajax popupcalendar control and putting in textbox.....I want to access that value in next page...but I am not able to access the text box value(date) into next page when I click the button.......
Thanking you
Mcmilan.
|
|
|
|
|
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.
|
|
|
|