这段代码有什么问题 [英] Whats the wrong in this code

查看:91
本文介绍了这段代码有什么问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

if(Session["user"]=="admin")
{
}


但条件不起作用.

请告诉我哪里错了.

在此先感谢


but condition is not working.

please tell where i get wrong.

Thanks in advance

推荐答案

除了总体上写得不好之外,代码还不错,它可以完全满足您的要求.问题是,您的总体设计有什么问题导致该代码无法执行您想要的操作,为什么您几天来一直在问同样的问题,为什么您不能提供更多信息,例如出了什么问题,使用调试器等时发现了什么?

我怀疑答案是您不知道自己在做什么,也不应该编写明显在处理网站安全方面的代码.您公司中的其他人是否对编写好的代码一无所知,还是您的客户被剥夺了权利?

我以前给过你很好的建议,但我看你没有遵循,所以请原谅我,如果我不去尝试帮助拒绝听的人.
Apart from being poorly written in general, the code is fine, it will do exactly what you''re asking it to. The question is, what is wrong with your overall design to cause this code to not do what you want, why have you been asking the same question for days, why can''t you provide more information, such as what is going wrong, what you''ve found when you use the debugger, etc ?

I suspect the answer is that you have no clue what you''re doing and should not be writing code that obviously is handling a secure aspect of a website. Does anyone else in your company know anything about writing good code, or is your client just flat out being ripped off ?

I''ve given you good advice before, and I see you''ve not followed it, so pardon me if I don''t bother trying to help someone who refuses to listen.


您的问题是什么.我们不是魔术师.该条件没有什么问题,除了您的代码即使满足条件也不会执行任何操作.您希望我们帮助您告诉我们问题出在哪里和出了什么问题.
what is wrong with you.We are not magician here.There is nothing wrong with the condition apart from your code does not do anything even if the condition is satisfied.You want us to help you tell us where and what is the problem.


这篇关于这段代码有什么问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆