c# - How to update database using addon entity framework model? -
i'm using tinymce give me html tags user desire, store them in database , call them later @ appropriate portion of pages.
everything working fine until hit update button, tells me updated find send same old data.
this updating syntax use
int id1 = int.parse(request.querystring["titelid"]); webmarketingentities wme = new webmarketingentities(); articls ar = new articls(); articls query = (from art in wme.articls art.id==id1 select art).first(); ar.articalcontent = txtconteny.text; ar.pagedescription = txtdescription.text; ar.pagetitle = txttitle.text; wme.savechanges();
i figured solution:
i should have written select statement following:
if(!page.postback) { //your select syntax }
Comments
Post a Comment