c# - How to POST whole object using BeginForm -
i have index view lists results of sql query aggregates errors log table.
i have "details" link each of these aggregated records allow user drill details of each record.
the details view load more sql data record.
since there no id or key by, i'm using error string, can sometime large , include "potentially dangerous characters" pass in param.
is there better way go accomplishing this?
edit: i'm storing entire results set session , selecting correct row it's index i'm passing in. working prefer avoid session use in case if possible.
just pick id underlying table , link somehow. here's sketch of example:
to retrieve data html table:
select min(logtablepk) arbitraryid, logtext logtable group logtext
to render table:
<a href="getdetails.cshtml?id={arbitraryid}">{logtext}</a>
to obtain details:
select * logtable logtext = (select logtext logtable logtablepk = {arbitraryid})
Comments
Post a Comment