MVC
Web forms
Web forms Tutorials

Using Predefined Parameters Tutorial

Previous Tutorial
In order to proceed please first download the Finished solution from the Previous Tutorial, or use yours if you've done it.

For this tutorial we are going to use the service method from the previous one, but instead of using the "Data" property we will use the "Parameters" and set parameters with predefined values

1. Add this in default.aspx
<%
            FruitsDefined.Parameters = new Dictionary<string, string>
                                 {
                                     {"c1", "1"},
                                     {"c2", "2"},
                                     {"custom", "blueberry"},
                                     {"max", "9"}
                                 };
    //the key is the name of the parameter in the service method
    //the value is the value of the parameter
    %>
    <o:AjaxRadioList runat="server" ID="FruitsDefined" Url="~/Aja.svc/FruitsBoundToManyThings"/>

FruitsDefined control will have the fruits items from categories 1 and 2, will have an additional "blueberry" item, and it will show maximum 9 items (+ the blueberry = 10)
2.Run it (F5)