locked
Response.Write is not working in mobile devise RRS feed

  • Question

  • User-787022634 posted

    Hello, 

    I have this problem.

    string redirect = "<script language=javascript>child=window.open('" + "/PageHome/sture?id=" + Request.QueryString["id"].ToString() + "&Jobtitle=" + Request.QueryString["title"].ToString() + "');</script> ";
    Request.QueryString["Jobtitle"].ToString()) ");

    Response.Write(redirect);

    work  in  (browser  pc) but  it works not with mobile(smartphone and ...).

    Thanks for help

    Wednesday, April 15, 2015 6:06 AM

All replies

  • User-821857111 posted

    Where are you using Response.Write? In a Web Form? Or a handler? If you use it in a Web Form, the response gets injected before the opening HTML tag and may not work correctly anywhere. You should use a Literal control instead.

    Monday, April 20, 2015 9:20 AM
  • User71929859 posted

    Instead of Response.Write use ClientScriptManager.RegisterStartupScript method to call the javascript on startup.

    Sunday, April 26, 2015 7:28 PM