Rectangle 27 0

c aspx client side dynamically create asp tags?

ASP.Net is a server technology that is parsed on the server and creates HTML and JavaScript dynamically which is then passed on to the client. The client browser is technology agnostic; it does not know or care if the server used ASP.Net, Ruby/Rails, PHP, Java, or any other technology to create the HTML and JavaScript. If you are trying to change the output on the client, you must either use JavaScript to make calls to the server to request the new information and then change the data values (Commonly referred to as AJAX, an acronym for Asynchronous JavaScript and XML), or you must do a full Postback to the server and have the server re-render the HTML. Newer ASP technologies (ASP.Net MVC, for example) use a combination of Server Side and JavaScript technologies to make this process less manual, but they are ultimately hiding the implementation of AJAX calls.

After re-reading your post, I believe I understand what you are trying to do. The CommandArgument is a literal string which you are trying to write the value of a variable into before passing it to the client. In order to do this, you need to use the #Eval keyword, i.e. CommandArgument='<%#Eval("item.Code")%>'. This establishes a one way binding for this value in the string property.

I know this. But it doesnt help. The client will recieve an html, no matter if I will write <%:item.Name %> or <asp:button runat="server" OnClick="Add_Click" CommandArgument="blabla"> . Both case translte to HTML on the browser. So why can't it be a combintaion?

Yep, It seems to me that by 'Client Side' He actually means the Markup. Where Client Side is usually used to refer to DHTML functionality.