How do I resolve the error ‘The server rejected one or more recipient addresses. The server response was: 503 This mail server requires authentication. Please check your mail client settings’
CDOSYS supports username and password authentication, and version 1.1 of the .NET Framework added the Fields property to the MailMessage class, which lets you set arbitrary fields of the underlying CDOSYS object. Refer Extending System.Web.Mail
How to set a Datagrid Column to invisible when that Column is an AutoGeneratedColumn
In the DataGrid’s declaration, add the following code in OnItemDataBound event VB.NET Dim dv As DataView = DataGrid1.DataSource ’Bind you DataGrid1 in Page_Load to DataView Dim dc As DataColumnCollection = dv.Table.Columns e.Item.Cells(dc.IndexOf(dc(‘field_name))).Visible = false C# DataView dv = DataGrid1.DataSource ;//Bind you DataGrid1 in Page_Load to DataView DataColumnCollection dc = dv.Table.Columns; e.Item.Cells[dc.IndexOf(dc[‘field_name’])].Visible = false;
I have created a .NET user control page (.ascx) but I cannot compile and run it.
User control (ascx) can’t be run on it own, but you can drag it onto any web page (aspx) and then run it.
How to check if the current User has been Authenticated?
VB.NET If User.Identity.IsAuthenticated Then ’Your code End If C# if (User.Identity.IsAuthenticated ) { //Your code }
Why do I get error message ‘Login failed for user DOMAIN\USERNAME’
You’ll have to create an account in SQL Server for the aspnet user. Start enterprise manager-> expand the server-> select security->Right-click in the right view and select new login, enter the DOMAIN\USERNAME and select your database as the default database of the user at the bottom of the page, Select last tab Database Access -> select your database, and add the db_datareader and db_datawriter policies to your user.