开发者

How to Calculate Percentage for Profile Compltance

I have Create Many tables For User Registration Like Naukri... When i finished registration i h开发者_如何学JAVAave to show user the profile completance ,exactly like naukri way .how can i do it in asp.net?


I think it is better to calculate the number fields than the tables' count, as there might be tables containing more columns than other. Then you can put "weight" for the fields, if you think that some are more important, such as email address. Then go through the fields and check if they are filled. Something like

if (!String.IsNullOrEmpty(EmailAddress))  
{  
completeProgres += fieldWeight;  
}  

//After you check all the fields  
progressInPercentage = (completeProgres / totalWeights) * 100;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜