c# - ASP.NET profile privatization -
while creating new account every user want create them have separate tables names , uploaded files of own, upload solved , working. easy do? because didn't find related privatization. if registers person else can see it. private defaultconnection db = new defaultconnection();
// get: persoana [allowanonymous] public actionresult index() { return view(db.persoane.tolist()); } // get: persoana/details/5 [allowanonymous] public actionresult details(int? id) { if (id == null) { return new httpstatuscoderesult(httpstatuscode.badrequest); } persoana persoana = db.persoane.find(id); if (persoana == null) { return httpnotfound(); } return view(persoana); } // get: persoana/create public actionresult create() { return view(); } // post: persoana/create // protect overposting attacks, please enable specific properties want bind to, // more details see http://go.microsoft.com/fwlink/?linkid=317598. [httppost] [validateantiforgerytoken] public actionresult create([bind(include = "persoanaid,nume,prenume,slujba")] persoana persoana) { if (modelstate.isvalid) { db.persoane.add(persoana); db.savechanges(); return redirecttoaction("index"); } return view(persoana); }
there edit , delete, hope helps me.
Comments
Post a Comment