Passing custom param to RadUploadHandler

3 posts, 0 answers
  1. Patrick
    Patrick avatar
    17 posts
    Member since:
    May 2009

    Posted 09 Dec 2009 Link to this post

    From my aspx code behind page I would like to pass a param, in my case threadID, to the UploadHandler.

    Something like this


    How can I accomplish this, could I also pass multiple params?

  2. Patrick
    Patrick avatar
    17 posts
    Member since:
    May 2009

    Posted 11 Dec 2009 Link to this post

     public MainPage()  
                Loaded += new RoutedEventHandler(Page_Loaded);  
            public void Page_Loaded(object sender, RoutedEventArgs e)  
                if (!String.IsNullOrEmpty(Request.QueryString["threadID"]) && !String.IsNullOrEmpty(Request.QueryString["threadTypeID"]))  
                    string threadID = Request.QueryString["threadID"];  
                    string threadTypeID = Request.QueryString["threadTypeID"];  
                    RadUploadSilverlightControl.AdditionalPostFields.Add("threadID", threadID);  
                    RadUploadSilverlightControl.AdditionalPostFields.Add("threadTypeID", threadTypeID);  

    I am still struggling to understand exactly what I am supposed to do.
    I need the threadID and threadTypeID in my UploadHandler. I put this code into the  MainPaige.xaml code behind (.xaml.cs) file
    but I am not sure if I am going about it the right way. If this is the way to do it then I guess I just have to add
    the System.Web.dll to my References in the Silverlight app so that it would find Request.Querystring.
    The way it is right now I am getting red lines under Request.Querystring. Could somebody
    confirm that what I am doing is correct or wrong, please!
  3. DevCraft banner
  4. Kiril Stanoev
    Kiril Stanoev avatar
    1508 posts

    Posted 15 Dec 2009 Link to this post

    Hi Patrick,

    Sending parameters from the Html page to the Silverlight object is discussed in the Passing Parameters Into Silverlight Applications. There is a pretty good explanation plus a link to the video.

    In order to get familiar with custom parameters please preview the Passing custom params to the server side handler article.

    Sincerely yours,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top