A simple data binding is a conection between a piece of data and a server control. This conection is set through a special syntax which is in charge of evaluating when the code of the page is processed.
Let's see an example:
<asp:textbox runat="server" text='<%# dropdown.SelectedItem.Text %>' />
A expression like this one uses the following syntax:
- You should enclose in angle brackets and percent signs (<%...%>)
- You should use the number symbol (#) as a prefixed.
Once you have this kind of conection your textbox will show whatever that the user had chosen from the dropdownlist.
No hay comentarios:
Publicar un comentario