Posts Tagged ‘ASP.NET’

Developing MS Word XML Using the MS Office Word 2003 XML Toolbox

2 years ago. I have implemented a small tool which it can generate MS word document with dynamically data from SQL server database to replace some wordings from original MS word document. This tool was for an existed ASP.NET web application. The user had to output lots of MS world document or PDF document everyday, [...]

Leave a Comment

Setup ASP.Net 2.0 Providers

(from: http://www.aquesthosting.com/HowTo/Sql2005/Providers.aspx)
Note: The new Aquest Hosting control panel now has a page that will install your ASP.Net 2.0 Providers to your SQL database for you. All you have to do is pick your database and click the button. If you are already hosting with Aquest Hosting, then you can skip this tutorial and use the [...]

Leave a Comment

Invalid operator for data type. Operator equals add, type equals bit

When I wrote a sql server stored procedure, got a error message about bit data type when I tried to run this script:
Invalid operator for data type. Operator equals add, type equals bit.
The error msg is saying that a bit type parameter cannot be concatenated against the 2 strings. Cast it as varchar or nvarchar
The [...]

Leave a Comment

How To Create an ASP.NET Application from Multiple Projects for Team Development

I got this good article from Microsoft:
How To Create an ASP.NET Application from Multiple Projects for Team Development
(from: http://support.microsoft.com/kb/307467)
I copied all their content in my Blog before, and put there , nobody told me sth. about it, but yesterday I transfer my old blog to this new one, sb. else posted comment and let me [...]

Leave a Comment

asp.net调用存储过程方法

原文地址:http://www.51la.org/webjx/htmldata/2005-12-24/1135405777.html

摘要 存储过程的调用在b/s系统中用的很多。传统的调用方法不仅速度慢,而且代码会随着存储过程的增多不断膨胀,难以维护。新的方法在一定程度上解决了这些问题。

关键词 asp.net;存储过程
在使用.net的过程中,数据库访问是一个很重要的部分,特别是在b/s系统的构建过程中,数据库操作几乎成为了一个必不可少的操作。调用存储过程实现数据库操作使很多程序员使用的方法,而且大多数的程序员都是能使用存储过程就使用存储过程,很少直接使用sql语句,所以存储过程是很有用而且很重要的。

Leave a Comment

ASP.NET get page name, visiting user name, function name, form name:

1: string username = Me.Page.User.Identity.Name
2: string username = System.Environment.UserName()
1: string pagename = Me.Page.GetType().Name()
2: string pagename = Request.Path.Substring(Request.ApplicationPath.Length + 1)
1: string functionname = System.Reflection.MethodBase.GetCurrentMethod().Name
1: string formname = Request.Path.Substring(Request.Path.LastIndexOf(”/”)+1);

Comments (3)

Cannot convert type ‘ASP.login_aspx’ to ‘System.Web.UI.WebControl’

If you have used a Page that effectively uses a codebehind classname
that is the same as say the Login control, that is Login, e.g. your
page was called Login.aspx, then when you pre-compile (publish) the web
site as an updateable web site, the aspx is retained and tries to
compile against a type called Login in the code [...]

Leave a Comment

how to get aspx page username ?

in vb its system.environment.username - whats the equivalent in aspx with
code behind (VB) ?
——————————————————————————–
In the codebehind of your aspx code, you could use:
Page.User.Identity.Name ;
In a custom class, you could use:
HttpContext.Current.User.Identity.Name;
——————————————————————————–
thanks but niether seems to work - aspx accepts it but it does nothing!
——————————————————————————–
It depends how you would like to use it.
If you want to get [...]

Leave a Comment