automatic redirect to other page using window.open from client side when page is fully posted back

 hi,

     i am experiencing  a problem in <asp:history runat="server"/> control.in order to maintain back and forward button concept i am using <asp:history control.

it works fine but the problem is when i redirect to other page using response.redirect ("") i loss my all history points and when i click on back/forward button i am redirected to last full rendered page not to partially updated by ajax.second thing is i cant use server.transfer("") ,since it will not change URL. Third thing is i cant use scriptmanager .registerclientscript block it also cause the problem and same thing is with response.write("<script></script>").

so i am trapped at all the points only one way is there to achieve my goal is ,if i could redirect to other page using window.open funtion on .aspx page.

 

I am using dropdownlist .when i change its selected index its autopostback on to server where i am performing some action.like storing data in session.which will be referred  on next page .

so overall i want to invoke a javascript function automatically which contains ex: window.open("default.aspx"); when page is fully posted back .

 

please reply if u have any clue..

thanks
 

 


 

0
shikharjain2007
1/14/2008 5:56:29 AM
asp.net.futures 1064 articles. 0 followers. Follow

3 Replies
1391 Views

Similar Articles

[PageSpeed] 50
Get it on Google Play
Get it on Apple App Store

please explain briefly with coading



www.askaspdotnet.com
0
patelkrups
1/14/2008 9:59:15 AM

you can use

 

server.transfer("url",true)

and on redirected page you can access previouse page controls value using request.form("control name")



www.askaspdotnet.com
0
patelkrups
1/14/2008 10:15:08 AM

Dear All,

            the answer to my question is, we have to call javascript function at the onload event of page's body

e.g. <html>

<head>

<script type="text/javascript" >

function myfunc ()

{

window.open("default.aspx"); 

</head>

<body onload="myfunc();">

</body>

</html>
its because form's body is actually formed only when all the controls are available on client site.

though its not working for me because my page updates using ajax (asynchronous)  which creates a region to update not full page so this event is not called in that case..

 

any way enjoy if any one benefitted with this help.

thanks and regards

shikhar 

 

0
shikharjain2007
1/21/2008 12:17:08 PM
Reply:

Similar Artilces:

Calling parent window (using master page) button click event from an opened child window (not using master page)
I have a parent window that pops up a child window. In the child window, there is a server control LinkButton, with the following command at code-behind upon clicking:         Response.Write("<SCRIPT> javascript:window.opener.document.getElementById('<%=btnMas.ClientID%>').click(); </SCRIPT>");        Response.Write("<SCRIPT> javascript:window.close() </SCRIPT>");        Response.End(); What it would like to do are:1) Invoke the ...

How can i create get values from Opened page in client side to my first page(server page)
i have a little bit problem that my Server page has coding like this : btn.attributes.add("onclick()",getdata()) and one text box is txt1 now when user clicks it Button btn then getdata function  executes ok client page function getdata(){ response.redirect("hello.aspx") } now on hello.aspx has 1 textbox txt2   now what ever the data has been inputted by user in (client side textbox) txt2 i want to assign it to txt1 (server side )conrtol on server pls help me send me code ...  Jay "Enjoy Life" When you do the redirect from Page #2 back to Page...

Open pop-up window in a Page using a Master Page
Helllo, I am trying to open a pop-up window within a page that contains a Master Page. It gives me an error, but if I try same code in a normal page, (no master page) it works fine. What is the trick here? I am including code. <input type="button" value="usage" onclick="javascript:window.open ('ImUsage.aspx?pID=' + this.form.TextBox15.value, 'useWin', 'toolbar=0, height=600, width=500, resizable=0, scroolbars=1')"> Tank you, Gus G. Hi Gus:The problem is that when you use Master Pages, the id of the controls is "mangled" (ASP.NET does this to ensure that each control has a unique...

Cross Page Post back Using Master Page
Hi thanks for reading my post. Can anyone tell me how (if it's possible) to do a Cross-Page Postback when using a Master Page? I used the following Code on the page I am posting to: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If PreviousPage IsNot Nothing AndAlso PreviousPage.IsCrossPagePostBack Then   Dim text As TextBox = CType(PreviousPage.FindControl(“TextBox1”), TextBox)   If text IsNot Nothing Then      Label1.Text = text.Text   End IfEnd IfEnd Sub It works ...

More than one page posts using window.opener.window.document.forms[0].submit();
 I've wasted an afternoon and evening trying to find a solution to this weird problem. I have a preview page(default.aspx) and an edit page (editdefault.aspx) as content pages within nested master pages. They are also within an iframe which is not within the nested masters. There are lots of other pages within the top level master page.I use a dynamically created asp:linkbutton to post from default.aspx to editdefault.aspx: Code behind:              LinkButton EditBtn = new LinkButton();      &...

Paging Paging Paging
I am trying to do paging with my search results and it isnt working very well. Here is what I've tried and I feel I've tried everything, lol, please help me out. Sub DataGrid1_SortCommand(Sender as object, e as DataGridSortCOmmandEventArgs) DataGrid1.DataBind() End Sub Sub Datagrid1_PageIndexChanged(Sender as object, e as DataGridPageChangedEventArgs) Dim ds as dataSet DataGrid1.CurrentPageIndex = e.NewPageIndex if Session("Search") is nothing then 'Session probably has expired, get the datasource from database Datagrid1.DataSource = ...

if page = current page redirect to other page
 hi ppl.. i wan to redirect my page to another page once read the page display is not the correct page. For example. once it reads the page is page1.aspx it will automatically redirect to page2.aspx  In your page load you can do the following: if(Request.Url.Contains("page1.aspx") { Response.Redirect("~/page2.aspx"); }    i tried but if(Request.Url.contains ... url does not have contains .. i am using C#i tried Request.Url.Equals ... also not working.. ...

Change content pages of Master Page without Master Page posting back?
so Master + content pages seems like exactly what I want except that they are assembled on postbacks. I am trying to make a site where both Master and Content pages have updatepanels, and the site switches content pages (40+ content pages) without the master page refreshing. Master Pages are assembled on postbacks so I don't think simple master page will work without annoying postbacks. I tried an approach where load content pages inside an Iframe, but the content pages take too long to load becuase each content page loads its own scriptmanager. View/Multiview will probably work but dif...

How to POST to a different page (using PostBackUrl) that opens in a popup window?
Hi, I've got a page that contains some TextBoxes and a LinkButton. When the LinkButton is clicked, the page is posted to a second page. In this second page I process the contents (Text) from the text boxes located on the first page. I got this working using the LinkButton's PostBackUrl property in combination with the Page.PreviousPage.FindControl() method. However, I want this second page to open in a (new) popup window. How do I do this?  Using a normal GET request with querystring variables isn't an option, because there may be too much data ...

Opening an apsx page in new window and redireting the opening page as well
I have a apsx form (Form A), which on submiting does a time consuming task. So i want to open a new aspx window (Form B) in which I want do do that time consuming task and show progress to the user and while that task is being completed I want Form A to redirect to Form C. I opened form B in a new javascript window and updated the progress through ajax but Form A doesn't let me redirect to Form C unless Form B's processing is Completed.  Any help will be greatly appreciated.   Hi coolsidsin,To give you a working answer I must see your code ...But I'm su...

redirect pages automat to another page
 in my site i have a folder for examplewww.mysite.com/blogs now I add subDomain blogs.mysite.com I want that if somone get to a page he redirecting to the subDomain for exampleif the user lookfor  www.mysite.com/blogs/1.htmhe will redirect to blogs.mysite.com/1.htmhow can I do it?(i have full control on both sites)thanks!  any suggestion? try this: http://msdn.microsoft.com/en-us/library/ms972974.aspx http://forums.asp.net/t/1278807.aspxRegards,Punithkumar Hi Redirect page from IIS refer this http://www.microsoft.com/technet/prodtechnol/Wind...

page automatically redirect to another page
Hi All, I have deployed web application register.aspx and view.aspx to one of the production server. I try to run the application and start to fill the information in register.aspx. In the register page there are 4 dropdown list each one dependent value populate another dropdown. When I select first dropdown page automatically redirected another page. Same application working fine in my local desk but problem is production sever. Could anyone help me to solve this problem. Gopal            Are you getting an error message? If yes, what is i...

Why the added Client Side Message Box to ASPX Pages always cause POST BACK?
Hi,          I met a problem is about message box added on the button. No matter I clicked OK or Cancel, even I clicked X to close the pop up dialog, the page always post back. It seems that confirmation dialog doesn’t work.          I use web visual developer 2005 express. The code I use to test was:         <form id="form1" runat="server">     <div>         <asp:Button ID="Button1" runat="server" Text="Click Me" /&...

I wrote code Response.Redirect then page is not redirected to reqquested page ( ajax.net)
I wrote code Response.Redirect then page is not redirected to reqquested page  (with ajax.net) make sure that your target URL is valied and correct... or the problem might be from your browserRegards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. dear, just paste the code so that we can assist u accordinglyKind Regards,Saurabh Sharmaonly dead fish swim along the flow of river, learn to make yo...

Web resources about - automatic redirect to other page using window.open from client side when page is fully posted back - asp.net.futures

Semi-automatic pistol - Wikipedia, the free encyclopedia
A semi-automatic pistol is a type of handgun which uses a single chamber and barrel , with a mechanism powered by the previous shot to load a ...

Man found carrying fully automatic sub-machinegun in Marrickville: police
A man has been caught with a sub-machinegun in his bag in Sydney's inner west, police say.

You can now install popular automatic screen brightness app Flux on iPhone and iPad
... is now possible to install screen brightness app Flux (or f.lux). Flux adjusts screen brightness and color depending on the time of day automatically, ...

Automatic voter registration doesn’t require a Constitutional amendment, but we still need one
Automatic voter registration is the single biggest expansions of the franchise states are currently engaging in, and they don’t even have to ...

Windows 10 will be made an automatic “recommended” update early next year
... it means that systems that are configured to download and install recommended updates—which for most people is the safest option—will automatically ...

'Alexa, where's my car?' Automatic syncs your vehicle with Amazon Echo
The connected car adapter is the latest product to craft an integration with Amazon's smart home speaker.

Chris Christie Vetoes Automatic Voter Registration Bill
... Monday that would have added 1.6 million new voters to the state’s rolls and made New Jersey the third state in the country to adopt automatic ...

National Park Rangers Bought Automatic Weapons And Flashbangs
Law enforcement officer at one park were called out for 'use of force issues'

This week in the war on voting: Chris Christie vetoes automatic registration bill
... have become the third state in the country to dramatically increase its voting base, and likely its voter participation, by adopting automatic ...

Sonos' automatic speaker tuning feature is available today
Sonos' new automatic tuning feature Trueplay is rolling out to the masses. The software addition adjusts the strength of various frequencies ...

Resources last updated: 11/25/2015 6:11:29 PM