Creating your own Class in C# in ASP.net #19

Creating your own Class in C# in ASP.net

  • It is kind of simple. You need to create a class library. The class library will create a dll file. From your project, you need to add reference to the dll file. Then you will be able to use the classes and methods of the class library.
  • Check the following codes. One is a sample class library and another one is how to use the class. The class library implements two methods such as add and subtract to add or subtract two numbers. The project uses the namespace [class library] and calls these methods
  • You can get the dll file in the bin/debug or bin/release folder under your class library project
  • You can right click on your project/website [in solution explorer], and click Add Reference, then click browse and select the dll file created
  • Check the class library below
  • Check the Form in picture. This form uses the class library.
  • Check the Form Code to use the Library
  • Check the Backend Form Code to use the Library

From: http://sitestree.com/?p=5327
Categories:19
Tags:
Post Data:2009-03-26 09:27:06

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Simple Ajax Applications in C# (ASP.Net) #19

Simple Ajax Applications in C# (ASP.Net)

  • If you are coming from PHP or Java Platform where you use JavaScript or JQuery to provide Ajax functionality, you still can use those strategies in ASP.net to provide Ajax functionality
  • Check our short note on Ajax using JavaScript. In .Net, you just have to call the JavaScript function (that implements Ajax functionality) on the event you want the Ajax functionality. However, you do not use runat=”server”.
  • Another approach is Using Ajax Server Controls such as ScriptManager, ScriptManagerProxy, UpdatePanel, ContentPanel, UpdateProxy
  • You can find these Ajax controls at the Toolbox under Ajax Extensions
  • You can grab them and place on your form, you can grab and place on the code, or you can write them in your code [whatever you are used to]
  • And yes, you could use JQuery as well. JQuery uses an wrapper on JavaScript functionality and makes the life of the developer little easier
  • In this short note, I will show a simple example of using Ajax Server Controls, also show you the code to invoke Ajax functionality using JavaScript
  • Now take a look at the simple application interface below. The application will calculate sum, difference, and multiplication of two numbers without refreshing the page. We will calculate immediately, also will show the situation when the calculation may take a little more time
  • The idea is simple, you need to add a ScriptManager control. If you use master pages, and the situation becomes that you need to place two ScriptManagers, just place one ScriptManager in the Master and use ScriptManagerProxy in the content page
  • use UpdatePanel around the controls that will be refreshed without the page being refreshed
  • Use UpdateProgress control, when you know that the operation will take some time. Use this control to inform the user that the operation is under progress
  • Now the sample application interface
  • Now the Form code
  • Now the backend code
  • Now an example on how to implement Ajax functionality in C# in ASP.net using JavaScript. It just displays current date time but using Ajax and without refreshing the page. Just go through the code

From: http://sitestree.com/?p=5326
Categories:19
Tags:
Post Data:2010-04-01 05:09:58

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

ASP.Net Validation Control Examples in C#. #19

ASP.Net Validation Control Examples. Just check the code below

Some note

  • RequiredFieldValidator: is used to check that a field is filled up
  • CompareValidator: Compare the value of a field with another field or data
  • RangeValidator: Compares the data is within a given range
  • RegularExpressionValidator: Domain name syntax, email addtress syntax
  • ValidationSummary: Display all validation errors in a summary box
  • CompareValidator: Write your own custom validation rules and display the outcome
  • Remember
    • You can display error on the side of the control
    • You can display error under the control
    • The example used both just for example
    • The Text property is the output that comes just where the validation control is placed. ErrorMessage propert is for the ValidationSummary
    • If you just want the Validation Summary output, use Display=”none” for the validation control (not the summarycontrol) itself
  • the code can be seen at http://salearningschool.com/samples/validate.txt as well
    Validation Control           







From: http://sitestree.com/?p=5304
Categories:19
Tags:
Post Data:2009-06-06 19:26:04

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Manipulating Configuration Parameters: For example Variables in web.config #19

To access a variable value, you can use the following type of code

string statusr = WebConfigurationManager.AppSettings["userLoginStatus"].ToString();
You will need to use: using System.Web.Configuration;or you can write as follows:string statusr = System.Web.Configuration.WebConfigurationManager.AppSettings["userLoginStatus"].ToString();

What about if you want to change the values of the variables in the web.config file. Check the code below:

//CompiledConfiguration myConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");//change values for the variables in the AppSettings sectionmyConfig.AppSettings.Settings["userLoginStatus"].Value = "1";//change values for the connection strings section        myConfig.ConnectionStrings.ConnectionStrings["myDatabaseName"].ConnectionString = "Data Source=....";myConfig.Save();//will return you the new valuestring statusr = WebConfigurationManager.AppSettings["userLoginStatus"].ToString();

The above code used:
System.Web.Configuration;
using System.Configuration;

A sample web.config file

From: http://sitestree.com/?p=5303
Categories:19
Tags:
Post Data:2007-10-10 15:52:36

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Random C# and MS SQl Server #19

Foreign Key in Table Declaration

CREATE TABLE ORDERS (   ID integer primary key,    Order_Date datetime,    Customer_ID integer references CUSTOMER(ID),    Amount double); ALTER TABLE ORDERS ADD FOREIGN KEY (customer_id) REFERENCES CUSTOMER(ID);

Stored Procedure Example

CREATE PROCEDURE [dbo].[procedure_name]      @param1 VARCHAR(100)     ,@param2 VARCHAR(200) OUTPUT    AS    
BEGIN       
DECLARE @param3 VARCHAR(100)       
SET @param3 = ' '       
IF @param1 IS NOT NULL AND LEN(@param1) > 1            
SELECT @param2 = 'The ' + @param1  + @param3        
ELSE             
SELECT  @param2 = '...is cool!'        
RETURN        
END    
GO

C# and Prepared Statements

int  id = 20;     
string  desc = "...." ;     
SqlConnection rConn = new SqlConnection("Persist Security Info=False;Integrated Security=SSPI;        database=northwind;server=mySQLServer");     
rConn.Open();     
SqlCommand command = new SqlCommand(null, rConn);     

// Create and prepare an SQL statement.     
command.CommandText = "insert into Region (ID, Description) values (@id, @desc)" ;     
command.Parameters.Add ( "@id", id) ;     
command.Parameters.Add ( "@desc", desc) ;     
command.Prepare() ;  

// Calling Prepare after having set the Commandtext and parameters.     command.ExecuteNonQuery(); 
    
// Change parameter values and call ExecuteNonQuery.     command.Parameters[0].Value = 21;     
command.Parameters[1].Value = "mySecondRegion";     command.ExecuteNonQuery();
conn = new SqlConnection(strConnectionString);   
SqlCommand cmd = new SqlCommand();   
cmd.CommandText ="insert into Profile values(@Name,@Age)";   
cmd.Connection = conn;   
cmd.CommandType = CommandType.Text;   
SqlParameter nameP = new SqlParameter();   
nameP.SqlDbType =SqlDbType.NVarChar;   
nameP.ParameterName = "@Name";   
nameP.Size = 50;   
nameP.Value = model.Name;   
SqlParameter ageP = new SqlParameter();   
ageP.SqlDbType =SqlDbType.Int;   
ageP.ParameterName = "@Age";   
ageP.Value = model.Age;   
cmd.Parameters.Add(nameP);   
cmd.Parameters.Add(ageP);   
conn.Open();   
cmd.Prepare();    
cmd.ExecuteNonQuery();

C# and Stored Procedure

conn = new SqlConnection("Server=(local);
DataBase=Northwind;Integrated Security=SSPI");       
conn.Open();  
     
SqlCommand cmd  = new SqlCommand("sp_name", conn);       
cmd.CommandType = CommandType.StoredProcedure;       
cmd.Parameters.Add(new SqlParameter("@CustomerID", custId));     
  
// execute the command       
rdr = cmd.ExecuteReader();     
  
// iterate through results, printing each to console       
while (rdr.Read())       
{          
Console.WriteLine("" + rdr["Total"] );       
}

From: http://sitestree.com/?p=5300
Categories:19
Tags:
Post Data:2007-02-11 12:57:35

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Razor, Web-page Model, Web-Application Development in C# #19

Razor, Web-page Model, Web-Application Development in C#

  • Razor: a markup syntax to add server side code into ASP.net pages
  • Razor example: Current time is @DateTime.Now
  • Razor Code Syntax
               Single statement block          @{ var message = "Hello World"; }           Inline expression or variable           The message: @message           Multi-statement block           @{              var greeting = "Hello";             var currentTime = DateTime.Now;             var greetMessage = greeting + " Current time is: " + currentTime;           }           The greeting is: @greetMessage      
  • Some Razor functions mainly used in the Layout file [can be used in other files based on the function]: RenderPage() – render the content of a page, RenderBody(), RenderSection(section) – render the content of a section named section
  • using _ at the beginning of a web-page name prevents it from being browsed from browser such as _header.cshtml, _Layout.cshtml
  • In ASP.net, you can hide sensitive information by using the _AppStart.cshtml file. Here, you can keep database passwords, and email passwords. You can also keep your webmail server configuration.
  • _AppStart.cshtm example
                   @{                  WebMail.SmtpServer = "smtp.bizmail.yahoo.com";                  WebMail.EnableSsl = true;                   WebMail.UserName = "sayed@justetc.net";                 WebMail.Password = "password";                  WebMail.From = "sayed@justetc.net";             }           
  • Some folders as used in ASP.net web applications: App_Data – to keep database files, Images – image files, Scripts – JavaScript files for example, Shared – common files such as CSS files
  • In a file path, ~ is used to indicate the virtual root folder.
  • Server.MapPath, can convert a virtual path to a physical path
  • @Href(cssPath), here cssPath is a variable for a path. You can use Href(cssPath) for the value of href attributes
  • Page object methods: href (builds a url), RenderBody(), RenderPage(page), RenderSection(section), Write (object) – HTML Encoded string, WriteLiteral – No HTML encoding
  • Page object properties: isPost, Layout, Page, Request, Server
  • You can add properties to the Page object such as Page.Title; here Title is your own variable [not built in]
  • Read from a physical file: File.ReadAllLines(filePath). You may want to use var filePath = Server.MapPath(“~/file.txt”);, to get the physical path from a virtual path
  • File.ReadAllLines(filePath), can also be used to read excel csv files [comma delimited]
  • Some ASP.net helpers: Helpers are just components. WebGrid, Chart, WebMail, and WebImage are some common helpers
  • WebGrid helper example: webGrid = new WebGrid (data); grid.getHtml(); data for example can be the rows of a database table, GetHtml () – will render the data as a HTML table.
  • Chart example
                   @{                  var db = Database.Open("dbName");                   var dbdata = db.Query("SELECT Name, Price FROM Product");                   var myChart = new Chart(width: 600, height: 400)                       .AddTitle("Product Sales")                      .DataBindTable(dataSource: dbdata, xField: "Name")                      .Write();                }           
  • The above example will create bar chart [column chart]
  • if you want a pie chart as output, use .AddSeries(chartType:”Pie” in the above example
  • You can use an Array, or XML data as the datafeed for the Chartff
  • Sending emails: WebMail.Send(to:”xyz@xyz.com”, subject: “Email from – ” + customerEmail, body: request )
  • Publish your web-site: Use the publish option fromyour IDE (Webmatrix, Visual Studio for Web)
  • Manual publish: Make sure that the server side has the compatible ASP.net framework, copy all of your folders and files, copy the DLL files into the bin folder, copy SQL server DLL files, copy the database if appropriate

From: http://sitestree.com/?p=5299
Categories:19
Tags:
Post Data:2006-07-25 23:46:16

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Random Notes and simple code on Developing Web Sites (Applications) in ASP.net using C# #19

Random Notes and simple code on Developing Web Sites (Applications) in ASP.net using C#

  • The information below primarily apply to the web page model of web-development in C#
  • _PageStart.cshtml runs at each page start/open
  • _AppStart.cshtml runs at the beginning of the application
  • Syntax to use the Layout file: @{Layout = “/Shared/Layout.cshtml”;}
  • if you use this – @{Layout = /Shared/Layout.cshtml”;} in the _PageStart.cshtml file, you will not need to use it at the top of each file
  • You can use Microsoft Webmatrix, Visual Web Developer, or Visual Studio for web development
  • Webmatrix, includes IIS Express, and also a database workspace where you can create and use compact SQL Server Databases
  • DateTime.Now : will display current date and time
  • You can connect to a database using var db = Database.Open(“db_name”);
  • db = Database.Open(“db_name”); will look for the database in the same workspace; if not found will use the connection parameter as defined in the web.config file to find and connect to database
  • Executing a query: var queryString = “SELECT * FROM Product ORDER BY Name”; db.Query(queryString)
  • Accessing each row from a rowset of data as returned from database:
                   foreach(var entry in db.Query((queryString))){                @entry.Id, @entry.Name            }               
  • if (IsPost) : will check if a form is submitted by POST or not
  • username = Request.Form[“username”]; Will retrieve username from the Request object [submitted form with control named username]
  • A basic login authentication code can be as follows
               var username = "";      var password = "";      var ErrorMessage = "";              // If this is a POST request, validate and process data     if (IsPost){                        username = Request.Form["username"];            password = Request.Form["password"];                        if (username.IsEmpty() || password.IsEmpty()){              ErrorMessage = "You must specify a username and password.";         }else{              // Login, Navigate back to the homepage and exit                if (WebSecurity.Login(username, password, false)){                  Response.Redirect("~/");                }               else{                   ErrorMessage = "Login failed";              }           }       }                                       @if (ErrorMessage!="") {            @ErrorMessage, Please correct the errors and try again.     }   
  • Execute an Insert Statement: db.Execute(“INSERT INTO UserProfile (Email) VALUES (@0)”, email);
  • WebSecurity object can be used for the security of your web-site (application) such as user authentication, block a page until a user is authenticated
  • Block user if he is not logged in [can be added at the top of the page to be blocked]
               @{              if (!WebSecurity.IsAuthenticated) Response.Redirect("~/Login"); //redirect to login page            }       
  • WebSecurity.InitializeDatabaseConnection(“db_name”, “profile_of_the_users_table”, “UserId”, “Email”, true);
  • WebSecurity.CreateAccount(email, password, false);

From: http://sitestree.com/?p=5298
Categories:19
Tags:
Post Data:2012-01-30 09:33:18

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Automating Digital Delivery with Paypal Payment Processing System #19

In the past, I implemented an automatic notification and digital product delivery system with Paypal Payment Processing System. The concept is, when a person buys products from your web-sites, he gets his products automatically as email attachments after you have confirmed the transaction. The most important part is – collecting payment data and buyer information from Paypal to ensure that the transaction is legitimate and the payment really went through. You can use either Paypal IPN or Paypal PDT to collect these data and email products on successful verification. Either will/should work. For me, PDT worked alright. Check the following web-pages/documents. Also, from PDT section, check the sample examples. For me the sample example with ASP/VBSCript worked alright.

In the past, I have worked with MiraServ, and Moneris payment processing systems. You can find short-notes and video tutorials in this web-site on them. Just search through our web-sites.

A relevant code in ASP is provided below. The code collects the payer’s information just after someone has paid. The code also checks, if the payment was successful, if so prints some details about the transaction and the payer

The flow of actions (in terms of code and operations)

  • Create a paypal button, provide return url for successful payment and canceled payment.
  • In your successful payment page, write down the following code
  • Your paypal account needs to be configured properly to make the following code work – consult the documents as listed above
  • You need to use the authentication code from your paypal account to/in the following code
  • The follwing code section
    authToken = "ytrtyrtr45654hgfhgfjhfsfdsfdsfds;ljlk" 'auth code for your paypal account txToken = Request.Querystring("tx") 'as sent from paypal query = "cmd=_notify-synch&tx=" & txToken & "&at=" & authToken set objectHttp = Server.CreateObject("Microsoft.XMLHTTP")   objectHttp.open "POST", "http://www.paypal.com/cgi-bin/webscr", false objectHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded" objectHttp.Send query

    submits to the paypal to grab transaction details. (remember, after payment the control is required to come to this page, then based on authentication code and tx-id, the code grabs detail transaction information)

< %      Dim query   Dim objectHttp  Dim strQuerystring  Dim i, result   Dim firstName, lastName, itemName, curGross, mcCurrency, email  Dim authToken, txToken  Dim strParts, intParts, aParts  Dim strResults, strKey, strValue        authToken = "ytrtyrtr45654hgfhgfjhfsfdsfdsfds;ljlk" 'auth code for your paypal account   txToken = Request.Querystring("tx") 'as sent from paypal     query = "cmd=_notify-synch&tx=" & txToken & "&at=" & authToken  set objectHttp = Server.CreateObject("Microsoft.XMLHTTP") objectHttp.open "POST", "http://www.paypal.com/cgi-bin/webscr", false    objectHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded" objectHttp.Send query   strQuerystring = objectHttp.responseText    If Mid(strQuerystring,1,7) = "SUCCESS" Then       strQuerystring = Mid(strQuerystring,9)      strParts = Split(strQuerystring, vbLf)      intParts = UBound(strParts) - 1     ReDim strResults(intParts, 1)       For i = 0 To intParts           aParts = Split(strParts(i), "=")          strKey = aParts(0)          strValue = aParts(1)            strResults(i, 0) = strKey           strResults(i, 1) = strValue         Select Case strKey              Case "first_name"                 firstName = strValue                Case "last_name"                  lastName = strValue             Case "item_name"                  itemName = strValue             Case "mc_gross"                   curGross = strValue             Case "mc_currency"                    mcCurrency = strValue               Case "payer_email"                    email = strValue                    email = Replace(email, "%40", "@")          End Select      Next        email = Replace(email, "%40", "@")      Response.Write("")        'send email to customer     Dim myObject        Set myObject = Server.CreateObject("CDO.Message")       'set the To and From        myObject.To = email     myObject.From = "webmaster@justetc.net"     myObject.Bcc = "sayed@justetc.net"              myObject.Subject = "Please download your product"       myObject.TextBody = "Dear Customer, Thank you for purchasing from us. Download from the link belownn"       myObject.AddAttachment "http://www.justetc.net/test.pdf"     myObject.Send()     'Set objects to "nothing" to free up the computer memory        Set myObject = nothing      'send email to the seller       Set myObject = Server.CreateObject("CDO.Message")       'set the To and From properties     myObject.To = "webmaster@justetc.net"       myObject.From = "webmaster@justetc.net"     myObject.Bcc = "sayed@justetc.net"              myObject.Subject = "You got one customer: Product emailed to the customer"      myObject.TextBody = "Customer email address: " & email              myObject.Send()     'Set your objects to "nothing" to free up the computer memory       Set myObject = nothing      Else        'log        Response.Write("ERROR") End If%>

We have received your order") Response.Write("Details
") Response.Write("
  • Name: " & firstName & " " & lastName & "
  • ") Response.Write("
  • Description: " & itemName & "
  • ") Response.Write("
  • Amount: " & mcCurrency & " " & curGross & "
  • ") Response.Write("
  • Email: " & email & "
") Response.Write("
Home Page

From: http://sitestree.com/?p=5281
Categories:19
Tags:
Post Data:2006-10-25 18:41:19

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Code: Email Sending using ASP #19


From: http://sitestree.com/?p=5280
Categories:19
Tags:
Post Data:2012-11-16 11:05:08

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Formatting Web-application output #19

  • You can apply CSS styles to format web-application output
  • If you have the same styles defined in multiple places (for the same element), the styles defined closest to the element will be applied. The order, inline, page, global
  • You can create classes that can be applied to multiple elements
  • Use the CssStyle/CssStyle attribute to apply a style class to a server control
  • use the class attribute to apply a style class to an HTML element
  • Yes, you need to create a style file, and link to it from your web-form
  • You can click the style property of an element or the style property/attribute of the form to bring the Style Wizard to define/modify existing styles
  • You can also use the ‘Add Style Rule’ option in the popup menu on the .css files to define new styles. Also, use the ‘Synchronize Document Elements’ from the popup menu if required

From: http://sitestree.com/?p=5234
Categories:19
Tags:
Post Data:2009-07-01 02:45:13

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>