Set default radprompt textbox default value

2 posts, 0 answers
  1. IBEE
    IBEE avatar
    5 posts
    Member since:
    Aug 2005

    Posted 02 Dec 2011 Link to this post

    Hi everybody,

    I would like to set a default value in the textbox of my radprompt, but I still can't do that :(

    The prompt is displayed when user click on an image in my application, and I implement the javascript in behind-code.
    Example :

    StringBuilder sb = new StringBuilder();
                sb.Append("<script language= javascript ");
                sb.Append("function promptEmail");
                sb.Append("(param){radprompt('email:', promptEmailCallBack, 300, 100, param, 'Title');}");
                if (!Page.ClientScript.IsClientScriptBlockRegistered("promptEmail" + this.ClientID))
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "promptEmail" + this.ClientID, sb.ToString());

    I add an argument to radprompt like
    radprompt('email:', promptEmailCallBack, 300, 100, param, 'Title', 'My Default text');

    but this display nothing in my textbox :(

    Can you please help me?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Dec 2011 Link to this post


    Try the following.

    radprompt('Client RadPrompt: What is the answer of Life, Universe and Everything?', promptCallBackFn, 330, 160, null, 'Client RadPrompt', '42')
    Note: Here 42 is the default value.

    Also take a look into the following documentation.
    Working with the Prompt Dialog

Back to Top