String path = System.Reflection.Assembly.GetExecutingAssembly().Location;
path = System.IO.Path.GetDirectoryName(path);
String path = System.Reflection.Assembly.GetExecutingAssembly().Location;
path = System.IO.Path.GetDirectoryName(path);
CookieContainer cookie = SMSClientLib.Login.Connect("mobileno.", "Password", out status); string[] siteParameters = SMSClientLib.Login.GetSiteParameters(cookie); string messgeSentResult = SendSMS.Send_Processing("RecMobile", "Message!", cookie, siteParameters);
Its Working...!!
using System;namespace AbstractClasses{ public abstract class Messager { protected string _recipient; protected string _message; public Messager(string recipient, string message) { _recipient = recipient; _message = message; } public void ProcessMessage() { LogMessageLength(); // the code from here var isValid = false; if (ValidateRecipient()) { isValid = true; SendMessage(); } // to here will be implemented by the concrete classes if (isValid) NotifyTheServiceOwner("The message was correctly sent"); else NotifyTheServiceOwner("The message was NOT sent"); } protected abstract void SendMessage(); protected abstract bool ValidateRecipient(); private void LogMessageLength() { // log the message Console.WriteLine("Sending a message of size: {0}", _message.Length); } private void NotifyTheServiceOwner(string note) { // notify the service owner via email } } public class SmsMessager : Messager { public SmsMessager(string _recipient, string _message) : base(_recipient, _message) { } protected override bool ValidateRecipient() { // validate the phone number return true; } protected override void SendMessage() { // use some SMS service to send the message } } public class EmailMessage : Messager { public EmailMessage(string _recipient, string _message) : base(_recipient, _message) { } protected override bool ValidateRecipient() { // validate the email address return true; } protected override void SendMessage() { // use the .Net classe to send an email } } class Program { static void Main(string[] args) { var messagers = new Messager[] { new EmailMessage("adrian@domain.com","Hello"), new SmsMessager("+4074312122", "Hi"), new EmailMessage("rahul@domain2.com", "Hello rahul") }; foreach (var messager in messagers) { messager.ProcessMessage(); } } }}.HeaderFreez
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}Step 2 Set Gridview’s HeaderStyle CssClass as followsCssClass="HeaderFreez"