Posts

Dynamic SEO for c# website,How To Set Html Title, Meta Keywords & Meta Description From Asp.Net(C#.Net)

Dynamic SEO for c# website,How To Set Html Title, Meta Keywords & Meta Description From Asp.Net(C#.Net) Dynamic SEO for C# website. Task: Put SEO stuff (Title of page, Meta keyword, Meta description) in website using c# code in asp.net website/ web application. Onsite SEO –in Dynamic Website or E-Commerce Website. Description: Now these day SEO is a very important thing in a Website (Dynamic Website or E-Commerce Website). When we work on SEO for website then we require the setup page title, Meta keyword, Meta description. So we require option for this in admin panel for Content Management System Website. Here I use a small function for this, you can connect it to database and call on pageload. C# Code for Dynamic SEO   public   void  settitle( string  pagetitle,  string  metakeyword,  string  metadescription)     {          HtmlTitle  obj =  new   HtmlTitle ...

how to delete entire table or stored procedure at a time in sql ?

sometime we need to delete all the table at a time ,so i am writing a code to delete table and  Stored  procedure. 1-For table deletion declare @procName varchar(500) declare cur cursor for select [name] from sys.objects where type = 'u' open cur fetch next from cur into @procName while @@fetch_status = 0 begin exec('drop table ' + @procName) fetch next from cur into @procName end close cur deallocate cur 2-For Stored procedure deletion- declare @procName varchar(500) declare cur cursor for select [name] from sys.objects where type = 'p' open cur fetch next from cur into @procName while @@fetch_status = 0 begin exec('drop procedure ' + @procName) fetch next from cur into @procName end close cur deallocate cur

How To search entire database ?

While browsing the SQL Server newsgroups, every once in a while, I see a request for a script that can search all the columns of all the tables in a given database for a specific keyword. I never took such posts seriously. But then recently, one of my network administrators was troubleshooting a problem with Microsoft Operations Manager (MOM). MOM uses SQL Server for storing all the computer, alert and performance related information. He narrowed the problem down to something specific, and needed a script that can search all the MOM tables for a specific string. I had no such script handy at that time, so we ended up searching manually. That's when I really felt the need for such a script and came up with this stored procedure "SearchAllTables". It accepts a search string as input parameter, goes and searches all char, varchar, nchar, nvarchar columns of all tables (only user created tables. System tables are excluded), owned by all users in the current database. Feel ...

How to encrypt Bitmap image in c#

In this post I will show you how to encrypt bitmap image in c#.The technique is very simple.First we extract header from the image and then encrypt the rest byte data and then combined the header with this encrypted data. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace Enc { class Program { static string FILENAME = @"D:\ub.bmp" ; static string ENCFILENAME = @"D:\enc.bmp" ; static void Main( string [] args) { //Create instance of DES TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider(); //Generate IV and Key des.GenerateIV(); des.GenerateKey(); //Set Encryption mode des.Mode = CipherMode.ECB; //Read FileStream fileStream = new FileStream(FILENAME,...

How to encrypt Bitmap image in c#

EXPLAIN  :Sometime we need to countdown timer on website as for bidding website or any else. Then we can use Ajax control to achieve this task. Here I created code for countdown timer (server time). I used server countdown timer because for bidding we need server time not client machine time which used in javascript code. note : need ajax control toolkit to add first. It is freely available at http://www.asp.net/ajaxlibrary/AjaxControlToolkitSamlpleSite/ Here, you can find many sample code for how use ajax controls in your website. In addition I make CSS for round corner of DIV tag. my div is as a circle. ........................................Design Page ... Save it as timer.aspx............................................................ <% @   Page   Language ="C#"   AutoEventWireup ="true"   CodeFile ="timer.aspx.cs" Inherits ="timer"   %> <% @   Register   assembly ="AjaxControlToolkit"   namespace ="...

CountDown -Timer ajax control c#.net Asp.net

dgtyrtyrertyurt

Get value of dynamic textbox when button click

                               Get value of  dynamic textbox  when button click <html> <head id = "Head1" runat = "server" > <title> sample </title> <script runat = "server" > protected void Page_Load ( object sender , EventArgs e ) { if (! IsPostBack ) { var lstTextBox = new List < TextBox >(); for ( int i = 0 ; i <= 4 ; i ++) { TextBox txtbx = new TextBox (); txtbx . ID = string . Format ( "txtbx{0}" , i ); // txtbx.AutoPostBack = true; lstTextBox . Add ( txtbx ); txtbx . Text = "initial value" + i . ToString (); Panel1 . Controls . Add ( txtbx ); } Session [ "ls...