Wednesday, April 20, 2011

Finding Entered Text is String or Numberic in C# by using Regex class

Finding Entered Text is String or Numberic in C# by using Regex class


//Here i am writing code for Searching company either by using company id or company name

protected void Page_Load(object sender, EventArgs e)
   {
        if (IsNumber(txtDISCompanyId.Text))
            {
                DataSet ds = ListMatchingCompanies("", "", "", txtDISCompanyId.Text);
                GetDIsCompanyInfo(ds);
            }
            else
            {
                DataSet ds = ListMatchingCompanies(txtDISCompanyId.Text,"","","");
                GetDIsCompanyInfo(ds);
            }
   }


//This function will return either true or false. If the given text is numeric it will return true. else it will return false(entered text is string)
 bool IsNumber(string text)
        {
            Regex regex = new Regex(@"^[-+]?[0-9]*\.?[0-9]+$");
            return regex.IsMatch(text);
        }


Thursday, April 14, 2011

ASP.NET MVC

<div style="width:481px;"><p style="margin:0px;padding:0px;"><a href="http://www.wiziq.com/tutorial/4832-Asp-Net-MVC-Framework" target="_blank">Asp.Net MVC Framework</a></p><p style="margin:0px;padding:0px;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="481" height="402" id="player" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowfullscreen" value="true" />     <param name="movie" value="http://www.wiziq.com/player.swf?u=http://m.wqimg.com&p=4832_634111908669675000_presentationinfo.xml&n=wiziq&s=1&q=6oAY0ydv8eeuhSFnefFkR1PegG3cpG5Tu%252fAcM%252ffVfcpbJhnVN13NevdydXkqZeZSxyBIpYFvaofHZnVAZcMl8g%253d%253d" /><embed src="http://www.wiziq.com/player.swf?u=http://m.wqimg.com&p=4832_634111908669675000_presentationinfo.xml&n=wiziq&s=1&q=6oAY0ydv8eeuhSFnefFkR1PegG3cpG5Tu%252fAcM%252ffVfcpbJhnVN13NevdydXkqZeZSxyBIpYFvaofHZnVAZcMl8g%253d%253d" width="481" height="402" name="player" align="middle" allowscriptaccess="always" allowfullscreen="true" swliveconnect="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></p>  <p style="margin:0px;padding:0px;">Uploaded by <a href="http://www.wiziq.com/zubairmasoodi" target="_blank">Zubair</a> on <a href="http://www.wiziq.com/content/" target="_blank">WiZiQ Tutorials</a></p></div>


Wednesday, April 13, 2011

The World's Most Powerful People (Forbes)



Rank Name Organization Age
1 Hu Jintao

Hu Jintao

President

People's Republic of China 68
2 Barack Obama

Barack Obama

President

United States of America 49
3 Abdullah bin Abdul Aziz al Saud

Abdullah bin Abdul Aziz al Saud

King

Saudi Arabia 86
4 Vladimir Putin

Vladimir Putin

Prime Minister

Russia 58
5 Pope Benedict XVI

Pope Benedict XVI

Pope

Roman Catholic Church 83
6 Angela Merkel

Angela Merkel

Chancellor

Germany 56
7 David Cameron

David Cameron

Prime Minister

United Kingdom 44
8 Ben Bernanke

Ben Bernanke

Chairman

Federal Reserve 57
9 Sonia Gandhi

Sonia Gandhi

President

Indian National Congress 64
10 Bill Gates

Bill Gates

Co-Chair

Bill & Melinda Gates Foundation 55
11 Zhou Xiaochuan

Zhou Xiaochuan

Governor

People's Bank of China 63
12 Dmitry Medvedev

Dmitry Medvedev

President

Russia 45
13 Rupert Murdoch

Rupert Murdoch

CEO

News Corp. 80
14 Silvio Berlusconi

Silvio Berlusconi & family

Prime Minister

Italy 74
15 Jean-Claude Trichet

Jean-Claude Trichet

President

European Central Bank 68
16 Dilma Rousseff

Dilma Rousseff

President

Brazil 63
17 Steve Jobs

Steve Jobs

CEO

Apple 56
18 Manmohan Singh

Manmohan Singh

Prime Minister

India 78
19 Nicolas Sarkozy

Nicolas Sarkozy

President

France 56
20 Hillary Clinton

Hillary Clinton

Secretary of State

United States of America 63
21 Carlos Slim Helu

Carlos Slim Helu & family

Chairman

Telmex 71
22 Larry Page

Larry Page

Co-Founder

Google 38
22 Sergey Brin

Sergey Brin

Co-Founder

Google 37
23 Michael Bloomberg

Michael Bloomberg

Mayor

New York City 69
24 Benjamin Netanyahu

Benjamin Netanyahu

Prime Minister

Israel 61
25 Michael Duke

Michael Duke

CEO

Wal-Mart 61
26 Ali Hoseini-Khamenei

Ali Hoseini-Khamenei

Grand Ayatollah

Iran 71
27 Naoto Kan

Naoto Kan

Prime Minister

Japan 64
28 Timothy Geithner

Timothy Geithner

Secretary of the Treasury

United States of America 49
29 Ashfaq Parvez Kayani

Ashfaq Parvez Kayani

Chief of Army Staff

Pakistan 58
30 Lou Jiwei

Lou Jiwei

Chairman

China Investment Corporation 60
31 Kim Jong-il

Kim Jong-il

Supreme Leader

North Korea 69
32 Li Changchun

Li Changchun

Propaganda Chief

People's Republic of China 67
33 Warren Buffett

Warren Buffett

CEO

Berkshire Hathaway 80
34 Mukesh Ambani

Mukesh Ambani

Chairman

Reliance Industries 53
35 Jeffrey Immelt

Jeffrey Immelt

CEO

General Electric 55
36 Li Ka-shing

Li Ka-shing

Chairman

Hutchison Whampoa & Chueng Kong Holdings 82
37 Dominique Strauss-Kahn

Dominique Strauss-Kahn

Managing Director

International Monetary Fund 61
38 Masaaki Shirakawa

Masaaki Shirakawa

Governor

Bank of Japan 61
39 Dalai Lama

Dalai Lama

Dalai Lama

Tibet 75
40 Mark Zuckerberg

Mark Zuckerberg

Founder

Facebook 26
41 Ban Ki-moon

Ban Ki-moon

Secretary-General

United Nations 66
42 Lloyd Blankfein

Lloyd Blankfein

CEO

Goldman Sachs 56
43 Bernard Arnault

Bernard Arnault

Chairman

Louis Vuitton Moet Hennessy (LVMH) 62
44 Lakshmi Mittal

Lakshmi Mittal

Chairman

ArcelorMittal ADS 60
45 Robert Zoellick

Robert Zoellick

President

The World Bank Group 57
46 Robin Li

Robin Li

CEO

Baidu 42
47 Jamie Dimon

Jamie Dimon

Chairman

JPMorgan Chase 55
48 Larry Fink

Larry Fink

CEO

BlackRock 58
49 Rex Tillerson

Rex Tillerson

CEO

ExxonMobil 59
50 Bill Keller

Bill Keller

Executive Editor

The New York Times 62
51 Sebastian Pinera

Sebastian Pinera

President

Chile 61
52 Igor Sechin

Igor Sechin

Deputy Prime Minister

Russia 50
53 Abdalla Salem El-Badri

Abdalla Salem El-Badri

Secretary General

Organization of the Petroleum Exporting Countries (OPEC) 70
54 Charles Koch

Charles Koch

CEO

Koch Industries 75
54 David Koch

David Koch

Executive Vice President

Koch Industries 70
55 Masayoshi Son

Masayoshi Son

CEO

SoftBank 53
56 Khalifa bin Zayed Al-Nahyan

Khalifa bin Zayed Al-Nahyan

President

United Arab Emirates 63
57 Osama bin Laden

Osama bin Laden

Founder

Al Qaida 53
58 Eike Batista

Eike Batista

CEO

EBX Group 54
59 Bill Gross

Bill Gross

Co-Founder

PIMCO 66
60 Joaquin Guzman Loera

Joaquin Guzman Loera

Drug Trafficker

Sinaloa Cartel 56
61 Ratan Tata

Ratan Tata

Chairman

Tata Sons 73
62 Wang Yong

Wang Yong

Chairman

State-owned Assets Supervision and Administration Commission of the State Council of China (SASAC) 56
63 Dawood Ibrahim Kaskar

Dawood Ibrahim Kaskar

Leader

D-Company 55
64 Oprah Winfrey

Oprah Winfrey

Media Personality

The Oprah Winfrey Show 57
65 Joseph

Joseph "Sepp" Blatter

President

International Federation of Association Football (FIFA) 75
66 Jeff Bezos

Jeff Bezos

CEO

Amazon 47
67 Jacques Rogge

Jacques Rogge

President

International Olympic Committee 68
68 Julian Assange

Julian Assange

Editor-In-Chief

WikiLeaks 40