using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace infoExpediters { public partial class _Default : System.Web.UI.Page { string str; protected void Page_Load(object sender, EventArgs e) { lblNoRecords.Visible = false; if (Convert.ToInt32(Request.QueryString["strcontent"]) > 0) { lblNoRecords.Visible = true; lblNoRecords.Text = "No Records found for the given Search Criteria"; } GetContentData(); } // To display Home page content in the box below the search button public void GetContentData() { User Content1 = new User(); string Page = "Home Page"; ltHome.Text = Content1.GetContent(Page); } // Displays a list of companys starting with the A-C alpha bets protected void lnkac_Click(object sender, EventArgs e) { SecureString("A-C", 1); } // Displays a list of companys starting with the D-F alpha bets protected void lnkdf_Click(object sender, EventArgs e) { SecureString("D-F", 1); } // Displays a list of companys starting with the G-I alpha bets protected void lnkgi_Click(object sender, EventArgs e) { SecureString("G-I", 1); } // Displays a list of companys starting with the J-L alpha bets protected void lnkjl_Click(object sender, EventArgs e) { SecureString("J-L", 1); } // Displays a list of companys starting with the M-O alpha bets protected void lnkmo_Click(object sender, EventArgs e) { SecureString("M-O", 1); } // Displays a list of companys starting with the P-R alpha bets protected void lnkpr_Click(object sender, EventArgs e) { SecureString("P-R", 1); } // Displays a list of companys starting with the S-U alpha bets protected void lnksu_Click(object sender, EventArgs e) { SecureString("S-U", 1); } // Displays a list of companys starting with the V-X alpha bets protected void lnkvx_Click(object sender, EventArgs e) { SecureString("V-X", 1); } // Displays a list of companys starting with the Y-Z alpha bets protected void lnkyz_Click(object sender, EventArgs e) { SecureString("Y-Z", 1); } //Displays list of companys based on the search string protected void btnSearch_Click(object sender, EventArgs e) { lblNoRecords.Visible = false; string trimstr; trimstr = txtSearch.Text; str = trimstr.Trim(); SecureString(str, 0); } //Generate a encrypted query string value for search protected void SecureString(string SecureStr, int code) { SecureQueryString qs = new SecureQueryString(); qs["String"] = SecureStr.ToString(); qs["Codenum"] = code.ToString(); str = qs.ToString(); Response.Redirect("searchresults.aspx?qs=" + qs.ToString()); } } }