Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I believe you might find it useful to review how an <a href="http://www.javascriptkit.com/howto/aspnet.shtml" rel="nofollow noreferrer">ASP.NET page works</a> and how it <a href="http://msdn.microsoft.com/en-us/library/ms178472.aspx" rel="nofollow noreferrer">renders</a>. In your particular case you are setting the contents of a dropdownlist to your dataset. This will then render a 'select' object to the user with the appropriate entries without the need for Javascript. This all occurs on the server-side, which is processed on the server before a HTML response to given back to the user. </p> <p>With Javascript, this code runs on the client-side, i.e. the user's computer. Here it is possible to retreive your dataset (by this, the dataset will get serialised to be passed over the wire and read into a format that Javascript can read) and have it interact on the client-side. The question is, in your case, is why bother as you're rendering the dropdown on the server-side. If you are interested in pushing your dataset to Javascript, check out the links on this <a href="https://stackoverflow.com/a/9599330/698427">post</a> for a selection of approaches you can take.</p> <p>Minor notes:</p> <p>In your code you're using the '<a href="http://msdn.microsoft.com/en-us/library/system.data.dataset.acceptchanges.aspx" rel="nofollow noreferrer">AcceptChanges</a>' method when there is absolutely no reason to use this unless you're making a change(s) to the dataset which I'm guessing you're not in the PageLoad...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload