jquery - DOM replacement on backend (asp.net) -


i new asp.net , having on front-end replace dom node:

$('foo:eq(0) bar:eq(1)').html('hello world'); 

what best way in asp.net backend?

  1. node.js + jquery
  2. csquery

is there simple solution doesn't need plugin? razor + xpath?

you can't use nodejs+jquery if you're using asp.net.

with csquery replacement quite obvious:

cq.create("your html string")['foo:eq(0) bar:eq(1)'].html('hello world').render(); 

csquery comes asp.net mvc plugin make development easier. depends on use case.

if don't want external dependencies can use linqtoxml think if you'd run jquery queries , use jquery methods closest you're going in .net csquery


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -