C#
Posted on May 23, 2008. Filed under: C# |
public static DataSet RelatedKeyword(string keyword)
{string[] arr =keyword.Replace(“& “,“”).Split(‘ ‘);
DataSet ds = new DataSet();
DataSet dsTemp = new DataSet();
bool flag = false;
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["remote"].ConnectionString);
// DBAccess db = new DBAccess();
SqlDataAdapter sda;
foreach (string s in arr)
{ if (s.Length >= 2)
{ sda = new SqlDataAdapter(“select distinct top 60 keywordid, keywordname from keyword where keywordname like ‘%’+@ksearch+’%’”, con);
sda.SelectCommand.Parameters.Add(“@ksearch”, SqlDbType.VarChar).Value = [...]
Read Full Post |
Make a Comment ( None so far )
Posted on May 12, 2008. Filed under: C# |
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
mail.From=new MailAddress(”mymail@gmail.com”);
mail.To.Add(new MailAddress(”sendmail@yahoo.com”));//enter company name which send
mail.IsBodyHtml=true;
mail.Subject = “Sending Enquiry”;
mail.Body = “Enquiry About Company “;
//Proper Authentication Details need to be passed when sending email from gmail
System.Net.NetworkCredential mailAuthentication = new
System.Net.NetworkCredential(”maymail@gmail.com”, “password”);
//Smtp Mail server of Gmail is “smpt.gmail.com” and it uses port no. 587
//For different server like yahoo this details changes and you [...]
Read Full Post |
Make a Comment ( 1 so far )
Posted on May 12, 2008. Filed under: C# |
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace RUBRUDATAACCESS.SQL
{
public class DATALAYER:IDisposable
{
private IDbCommand cmd=new SqlCommand();
private string strConnectionString=””;
private bool handleErrors=false;
private string strLastError=””;
public DATALAYER()
{
[...]
Read Full Post |
Make a Comment ( None so far )
Posted on April 9, 2008. Filed under: C# |
hi
i study more time asp.net starter kit and i found best code for finding previous page server control.
But from prevoius page you must use postbackurl on button or use server.transfer(”go.aspx”);
The code is follow……..
public sealed class Util{
private Util(){
}
public static Control FindControlRecursively(string controlID, ControlCollection controls){
if (controlID == null || controls == null)
return null;
foreach (Control c in controls){
if [...]
Read Full Post |
Make a Comment ( None so far )