Click here to Skip to main content
15,889,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi aspx code
<asp:DataList ID="DataList1" runat="server" OnItemCommand="datalist1_downloader">
                        <itemtemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%#Eval("id")%>' CommandName="test">Check
 </itemtemplate>


.cs code
protected void datalist1_downloader(object source, Data
ListCommandEventArgs e)
    {
        
        if (e.CommandName == "test")
        {

            
            //code goes here

        }
    }


I want to send a querystring(commandArgument) to next page and that page would open in new browser according custom size i mean popup.
I don't kno what to do I has tried java script, response.write fnction and many other ways but code doen't successed
plz help
Posted
Updated 19-Jan-11 2:09am
v3
Comments
Hiren solanki 19-Jan-11 8:09am    
Removed irritating smiley used everywhere.

How about:
asp:LinkButton ID="LinkButton2" runat="server" onClientClick="window.open('http://pagetoopen.aspx');" ....

For info on window.open see http://msdn2.microsoft.com/en-us/library/ms536651.aspx

Regards
Espen Harlinn
 
Share this answer
 
use java script or script manager to open the new page


javascript:q=(document.location.href);void(open('http://example.com/submit.php?url='+escape(q),'_self','resizable,location,menubar,toolbar,scrollbars,status'));"

<pre lang="cs">protected override void CreateChildControls()
{
    if (ScriptManager.GetCurrent(Page) == null)
    {
        ScriptManager sMgr = new ScriptManager();
        // Ensure the ScriptManager is the first control.
        Page.Form.Controls.AddAt(0, sMgr);
    }
}

 
Share this answer
 
 
Share this answer
 
Comments
dkgawriya21 18-Jan-11 8:11am    
hi
this way is not working on google chrome browser;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900