在asp.net应用程序中使用模板 [英] using Template in asp.net application

查看:60
本文介绍了在asp.net应用程序中使用模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在asp.net应用程序中使用模板,因此在该模板中它还包含登录名,因此当我单击登录按钮并单击它直接指向源部分时,我想与该sql server数据库进行交互,因此我该如何提供在源代码部分中未使用Using System.Data.SqlClient命名空间,因此请给我一个建议.

Hi

i am using a template in asp.net application so in that template it contains login also so when i take a login button when i clicked on that it directs to source part i want to interact with that database of sql server so how i could provide the Using System.Data.SqlClient namespace in source part it does not identified so please give me a suggestion

推荐答案

听起来您必须添加对System的引用.数据.NET程序集.您可以通过在解决方案资源管理器中右键单击该项目,然后选择添加引用"来执行此操作.然后在弹出的对话框中选择.NET选项卡,然后在列表中选择System.Data程序集.您的文件现在应该可以识别System.Data.SqlClient命名空间.

但是,我建议您不要在Web应用程序项目中直接与数据库进行交互,因为您将在同一类中组合业务和ui逻辑.
It sounds like you have to add a reference to System.Data .NET assembly. You can do this by right-clicking on the project in your solution explorer and selecting "Add Reference". Then select the .NET tab in the dialog that pops up and select the System.Data assembly in the list. Your file should now recognize the System.Data.SqlClient namespace.

I would suggest, however, that your web application project is not the place where you should be interacting directly with a database as you would be combining business and ui logic in the same classes.


hi我在asp.net应用程序中使用模板,因为我双击登录按钮时它会重定向到应用程序的源部分,如何在该模板的源代码中提供using.System.Data.SqlClient命名空间?无法识别源部分中的名称空间

根据您的解决方案,我添加了对System.Data .NET程序集的引用.我可以通过右键单击解决方案资源管理器中的项目并选择添加引用"来完成此操作.然后在弹出的对话框中选择.NET选项卡,然后在列表中选择System.Data程序集.然后在我的文件后无法识别System.Data.SqlClient命名空间.


提供您的解决方案
hi i am using template in asp.net application in that i take login button when i double click on that it redirect to source part of an application how can u provide the using.System.Data.SqlClient namespace in source code of an that template it does not recognize the namespace in source part

according to u r r solution i have add a reference to System.Data .NET assembly. i can do this by right-clicking on the project in your solution explorer and selecting "Add Reference". Then select the .NET tab in the dialog that pops up and select the System.Data assembly in the list.then after my file should not recognize the System.Data.SqlClient namespace.


Give mr u r solution


这篇关于在asp.net应用程序中使用模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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