d****t 发帖数: 362 | 1 Does .net support some javascript features? For example:
(1) Shopping cart: items can be added to or deleted from a diplayed shopping
cart once users clicks some checkboxes on a item list webpage. I found there
is no refresh at all after selecting an item in javascript, but there will be
a refresh after an item is checked if we want to update the shopping cart
content once an item is selected.
(2) Simliarly, if we want to display coresponding cities for a state once it
is clicked on the same web | k****i 发帖数: 1072 | 2
be
extra
asp.net is server-side script,that's how it works.But you can combine client
side javascript in this scenario.
【在 d****t 的大作中提到】 : Does .net support some javascript features? For example: : (1) Shopping cart: items can be added to or deleted from a diplayed shopping : cart once users clicks some checkboxes on a item list webpage. I found there : is no refresh at all after selecting an item in javascript, but there will be : a refresh after an item is checked if we want to update the shopping cart : content once an item is selected. : (2) Simliarly, if we want to display coresponding cities for a state once it : is clicked on the same web
| b********s 发帖数: 12 | 3 Sure,you can do that. You can combine javascript with asp.net. This because
you can associate html controls with javascript and embed those controls in
.aspx page just like what you usually do in .html page.All web controls
delivered by .net are server side controls by default. For your example
1>Use asp.net checkbox instead of html checkbox and set it as
autopostback.Whenever you click this checkbox,the page will be refreshed.
2>Use html checkbox instead of asp.net checkbox.Write javascript as
【在 d****t 的大作中提到】 : Does .net support some javascript features? For example: : (1) Shopping cart: items can be added to or deleted from a diplayed shopping : cart once users clicks some checkboxes on a item list webpage. I found there : is no refresh at all after selecting an item in javascript, but there will be : a refresh after an item is checked if we want to update the shopping cart : content once an item is selected. : (2) Simliarly, if we want to display coresponding cities for a state once it : is clicked on the same web
|
|