Monday, June 25, 2018

Login and Logout coding Asp.net C#




Login button Coding
{
string mycon = "Data Source=DESKTOP-79IQ2D8; Initial Catalog=LoginPageDb; Integrated Security= True";
        SqlConnection scon = new SqlConnection(mycon);
        string myquery = "Select * From Users";
        SqlCommand cmd = new SqlCommand();
        cmd.CommandText = myquery;
        cmd.Connection = scon;
        SqlDataAdapter SDA = new SqlDataAdapter();
        SDA.SelectCommand=cmd;
        DataSet ds = new DataSet();
        SDA.Fill(ds);
        String uname;
        String pass;
        uname=ds.Tables[0].Rows[0]["uname"].ToString();
        pass=ds.Tables[0].Rows[0]["pass"].ToString();
        scon.Close();
        if (uname== TextBox1.Text && pass== tb_pswrd.Text)
       {
               Session["username"]=uname;
            Response.Redirect("Adminhome.aspx");

       }
        else
       {
            Label2.Text="Invalid username and password. Please Relogin with true username and password";
       }

    }
}



Logout button&page coding
protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            Label2.Text = "Hello" + Session["username"].ToString();
        }
    }
    protected void btn_logout_Click(object sender, EventArgs e)
    {
        Session.Abandon();
        Response.Redirect("Signout.aspx");
    }
Database

ubaidsardar.blogspot.com

Calculator in Asp.net C# easy method




Add  Button Coding
        int a, b, c;
        a = Convert.ToInt32(tb_1.Text);
        b = Convert.ToInt32(tb_2.Text);
        
        c = a + b;
      //Result is showing in label text You can  use Text box instead of label
            Lbl_result.Text = "Sum of two numbers is = " + c.ToString();
Subtraction  Button Coding

int a, b, c;
        a = Convert.ToInt32(tb_1.Text);
        b = Convert.ToInt32(tb_2.Text);
        
        c = a - b;
      
            Lbl_result.Text = "Subtraction of two numbers is = " + c.ToString();
Multiplication  Button Coding
int a, b, c;
        a = Convert.ToInt32(tb_1.Text);
        b = Convert.ToInt32(tb_2.Text);
        
        c = a * b;
      
            Lbl_result.Text = "Multiplication of two numbers is = " + c.ToString();

Devide  Button Coding
int a, b, c;
        a = Convert.ToInt32(tb_1.Text);
        b = Convert.ToInt32(tb_2.Text);
        
        c = a / b;
      
            Lbl_result.Text = "Devision of two numbers is = " + c.ToString();

Thursday, June 7, 2018

بالآخر پاکستان کو پانی کے لئے بھارت پر ایٹمی حملہ کرنا پڑے گا؟

 
آئیے آپ کو بتاتے ہیں کہ بھارت پاکستان کے ساتھ کس طرح جنگ چھیڑ چکا ہے اور اس جنگ میں بھارت کو مسلسل کامیابی مل رہی ہے جب کہ پاکستان کی عوام اور اس کے حکمران گھوڑے بیچ کر سو رہے ہیں۔ اور اس غلط فہمی میں چپ سادھ رکھی ہے کہ کونسا بھارت نے پاکستانکے خلاف میدان جنگ اپنی فوج اتار دی ہے۔

توقع کے عین مطابق عالمی بینک نے کشن گنگا ڈیم کی تعمیر پر پاکستان کی شکایات اور شواہد کو ناکافی قرار دے کر مسترد کر دیا ہے۔ یہ پاکستان کی بھارت سے سفارتی محاذ پر ایک بڑی شکست ہے۔ کشن گنگا ڈیم کی تعمیر 2009 میں شروع ہوئی جب پیپلز پارٹی کی حکومت تھی اور ن لیگ مضبوط اپوزیشن تھی۔2011 کے بعد دو سال تک یہ کیس عالمی عدالت میں چلتا رہا لیکن بالآخر عالمی ثالثی عدالت نے نہ صرف پاکستان کے اعتراضات مسترد کر دیے بلکہ بھارت کو پانی کا رخ موڑنے کی اجازت دے دی۔

یاد رہے کہ یہ وہ دور تھا جب بھارت کو پسندیدہ ترین ملک قرار دیا جارہا تھا اور خارجہ امور کا قلمدان بھی وزیر اعظم میاں نواز شریف کے پاس تھا۔ بھارت نوازی کی داستان صرف یہیں ختم نہیں ہوئی بلکہ دریائے سندھ پر تحقیق سے پتہ چلا کہ انڈیا نے ڈیم بنا کر دریائے سندھ کا سارا پانی روک لیا، بنائے جانے والے متنازعہ پن بجلی کے منصوبے نیموباز گو کے خلاف بھی وزیر اعظم صاحب کے احکامات کے مطابق عالمی عدالت میں جانے سے روک دیا گیا کہ “خوامخواہ اس کیس پر وقت ضائع ہوگا”۔۔۔بھارت نے یہ منصوبہ مکمل کر لیا ، یہی نہیں اس دوران “چٹک” کا منصوبہ بھی پایہ تکمیل کو پہنچ گیا اور ہم صرف بھارت سے پینگیں بڑھانے کے خواب دیکھتے رہے۔

میں عموماً سیاسی شخصیات پر تنقید سے اجتناب کرتا ہوں لیکن گزشتہ ایک دہائی میں زراعت اور آبی وسائل کی زبوں حالی کو دیکھ کر خون کھول اٹھتا ہے۔ مسلم لیگ ن کی ذمہ داریوں کا یہاں سے اندازہ کر لیں کہ اس دور میں بھارت صرف دریائے سندھ پر چودہ چھوٹے ڈیم اور دو بڑے ڈیم مکمل کر چکا ہے۔ یہی وجہ ہے کہ منگلا ڈیم اکتوبر 2017 سے خالی پڑا ہے جبکہ تربیلا ڈیم بھی اس وقت بارش کا محتاج ہے۔ یہ کہانی یہیں ختم نہیں ہوتی، پانی کے حوالہ سے ہمارا مستقبل بہت دردناک ہے۔

دو سال قبل بھارتی وزیر اعظم نریندر مودی نے بیان دیا کہ وہ پاکستان کو پانی کی بوند بوند کے لیے محتاج کر دے گا اور وہ اس پر عمل کر رہا ہے۔ بھارت دریائے چناب پر سلال ڈیم اور بگلیہار ڈیم سمیت چھوٹے بڑے 11ڈیم مکمل کر چکا ہے ۔ دریائے جہلم پر وولر بیراج اور ربڑ ڈیم سمیت 52ڈیم بنا رہا ہے دریائے چناب پر مزید 24 ڈیموں کی تعمیر جاری ہے اسی طرح آگے چل کر مزید 190 ڈیم فزیبلٹی رپورٹس ، لوک سبھا اور کابینہ کمیٹی کے پراسس میں ہیں۔

یہ سب کچھ ہمارے سیاستدانوں اور حکمرانوں کی آنکھوں کے سامنے ہورہا ہے، لیکن کسی کو اس سے غرض نہیں، کوئی ووٹرز کو عزت دینے کا مطالبہ کر رہا ہے، کوئی مذہب پر سیاست کر رہا ہے تو کوئی بھٹو کے نام پر ملک لوٹ رہا ہے۔

اگر یہ مسئلہ کسی پارٹی کے منشور میں شامل نہیں ہے تو اس کے ذمہ دار ہم ہیں۔ عوام کے ووٹ دینے کے معیار نالیاں پکی کرنا، قیمے والا نان یا نام نہاد نمائشی سکیمیں ہیں، دراصل عوام ذہنی غلام بن چکے ہیں جن کی سوچنے سمجھنے کی صلاحیتیں ان کے سیاسی خداؤں کے تابع ہیں۔ اگر مجھ جیسے کم علم کو یہ حقائق ملکی مستقبل کے لیے فکر مند کرسکتے ہیں تو ہمارے نام نہاد دانشور اور میڈیا ہاؤسز کیوں ان موضوعات پر بات نہیں کرتے؟

کیوں کہ ہم بطورِ عوام ان موضوعات پر بات کرنا ہی نہیں چاہتے۔ مجھے سیاستدانوں سے گلہ نہیں کیوں کہ ان کی جائیدادیں پاکستان سے باہر ہیں، خدانخواستہ پاکستان پر کوئی آنچ آئی تو وہ اسے چھوڑ کر باہر بھاگنے میں دیر نہیں کریں گے۔ مجھے شکوہ عام لوگوں سے ہے جنہوں نے یہاں رہنا ہے، خدا وہ دن نہ دکھائے جب پانی کے گھونٹ کے لیے ایک بھائی دوسرے کا گلا کاٹ رہا ہو۔

بھارت یہ سب اپنے کسانوں کے لیے نہیں کر رہا، بلکہ اس کا مقصد پاکستان کو بنجر کرکے اسکی بائیس کروڑ عوام کو بھوکا اور پیاسا مارنا ہے، بھارت کو علم ہے کے پاکستان کی فوج سے جنگ چھیڑنا اپنی تباہی کے مترادف ہے، کیونکہ پاکستان کی یہ پالیسی ہے کہ اگر بھارت سے جنگ ہونے کی صورت میں اگر پاکستان کی سلامتی کو ذرا سا بھی خطرہ ہوا پاکستان ایٹم بم استعمال کرے گا، لہذا انتہائی چالاکی کے ساتھ بھارت پاکستان کو تباہ کر رہا ہے، اور اس جنگ میں بھارت کو نہ تو پاکستان کی فوج کا سامنا کرنا پڑے گا اور نہ ہی پاکستان کی بائیس اس کروڑ عوام کا۔

پاکستان کی عوام یہ مت سمجھے کہ کیا ہوا اگر بھارت  ہمارا پانی روک بھی لے  تو ہمیں پینے کے لیے پانی تو ملتا رہے گا، شاید عوام یہ سمجھ رہی ہے کہ ان کے گھر میں کیا گیا بور پانی پینے کے لئے اور زراعت کے لئے ٹیوب ویل غیرہ ان کے لئے کافی ہیں، مگر میں آپ کو بتا دوں کے اگر آپ کے دریاؤں کا پانی روک لیا گیا، تو آپ کے گھر میں کیا گیا بور اور ٹیوب ویل بھی آپ کو پانی دینا بند کر دے گا، کیونکہ زیر زمین پانی کی سطح انتہائی نیچے چلی جائے گی۔ زمین اناج اگانا بند کر دے گی۔

پاکستان میں جو قحط سالی جنم لے گی وہ انتہائی خوفناک صورت اختیار کرجائے گی، اور اس تباہی کا تصور آپ کر سکتے ہیں۔ بالاآخرپاکستان کو یا تو پیاسا مرنا ہوگا یا پھر ایٹمی جنگ میں مرنا ہوگا، دونوں صورتوں میں پاکستان اور اس کی عوام کو انتہائی دردناک دن دیکھنا پڑیں گے، اور یہ اس صورت میں ہوگا کہ ہم ابھی بھی چپ رہیں اور مجرمانہ لاپرواہی کا مظاہرہ کریں۔

اگر آپ سمجھ رہے ہو کہ اس صورتحال میں پاکستان کی فوج کچھ کرسکتی ہے تو یہ آپ کی بیوقوفی ہے، کیونکہ فوج صرف لڑنے کے لئے ہوتی ہے، زیادہ سے زیادہ فوج بھارت سے لڑسکتی ہے بھارت کے بنائے گئے ڈیموں کو اپنے میزائلوں سے نشانہ بنا سکتی ہے، مگر یہ مستقل حل نہیں، کیونکہ جواب میں ہمیں بھی میزائلوں کا سامنا کرنا پڑے گا، اور یہ رستہ دونوں ملکوں کی تباہی کا ہے ، ہماری حکومتوں کو ہمیں مجبور کرنا ہوگا کہ سفارتی سطح پر بھارت کو یہ ڈیم بنانے اور پاکستان کا پانی روکنے سے باز رکھا جائے۔

پاکستان میں آنے والی نئی حکومت سے سب سے پہلا مطالبہ یہی ہونا چاہیے کہ ہمیں سڑکوں، پلوں، میٹرو بسوں اور اورنج ٹرینوں کی ضرورت نہیں بلکہ ہمیں ڈیموں کی ضرورت ہے، جتنا پیسہ ان کاموں پر خرچ کیا جاتا ہے اس کا ایک چوتھائی حصہ بھی اگر ڈیموں پر خرچ کیا جائے تو پاکستان میں زراعت کو فروغ ملے گا پانی کی کمی دور ہوگی بجلی وافر مقدار میں پیدا ہوگی اور سستی بھی ملے گی، ہماری صنعتیں ترقی کریں گی کیونکہ ہماری آدھی سے زیادہ صنعتیں بند پڑی ہیں جس کی سب سے بڑی وجہ بجلی کی قلت ہے، صنعتیں چلیں گی تو برآمدات میں اضافہ ہوگا پاکستان ترقی کرے گا، صرف ڈیم بنانے کی وجہ سے پاکستان کو کتنا فائدہ ہوگا یہ سب اس آرٹیکل میں بتایا گیا ہے، خدا کے لئے اپنی نسلوں کے لئے آواز اٹھائیں۔

یاد رہے بھارت پاکستان کو اس فائدے سے دور رکھنے کے لئے پاکستان کی حکومتوں کو بھاری معاوضہ دیتا آیا ہے، تاکہ حکومتیں ایک تو پاکستان کے لئے ڈیم نہ بنائیں اور دوسرا سفارتی سطح پر بھارت کو غیر قانونی ڈیم بنانے سے نہ روکیں۔ اور تیسرا یہ کہ پاکستانی خزانے کو فضول کاموں میں جھونکا جائے، پاکستان کے خزانے کو تباہ کرنے کے لئے بھی بھارتی حکومت پاکستانی حکمرانوں کو بھاری معاوضہ دیتی ہے۔

نوٹ: اس آرٹیکل کو جس صورت میں آپ سے شیئر کیا گیا ہے اسی صورت میں دوسروں تک پہنچائیں۔ تا کہ پاکستانیوں کی اکثریت اس بات کو سمجھے، کہ آپ کے گھر کی نالی اور آپکی گلی پکی نہ بھی ہوئی تو آپ بھوکے پیاسے نہیں مریں گے۔ مگر ڈیم نا بنے تو یا تو آپ کو پیاس مار دے گی یا پھر ایٹمی جنگ۔

Thursday, May 24, 2018

The True Side Of Pakistan

1. Second largest gas infrastructure in the world:

Pakistan's gas distribution network is the second largest in the world after that of the United States, i.e. it is larger than those of all other industrialized countries such Germany, France, UK, Australia and others.

2. World class educational institutions:

Pakistan is now home to some to some the finest universities there can be. The Aga Khan University, Lahore University of Management Sciences, National University of Science and Technology, FAST, Indus Valley School of Art and Architecture and the Ghulam Ishaq Khan University are those newly established universities that have joined the ranks of older Pakistani educational institutions such as Dow, King Edward College of Medicine, National College of Arts and the IBA to become the bedrock of Pakistan's higher education infrastructure.

3. One of the most independent media in the world + stature of the journalists:

The media in Pakistan is among the most independent in the world even more so than countries like Israel, and maybe even the USA. As are the world-class journalists that comprise this institution. This has resulted in a silent revolution and national awakening throughout the length and breadth of Pakistani society similar to that which this country had witnessed prior to independence. Thus, thinkers and scholars now mould public opinion in a manner that is conducive for national building and progress.

4. An outstanding road network:

Many developed countries as well as most developing ones experience rush hour traffic jams and generally bad traffic throughout the day. In Pakistan, however, where the car to population ratio is small but growing at an astonishing pace, cities have managed to build road networks at an even faster pace. Thus, overhead bypasses, underpasses, ring roads and new motorways have successfully outpaced the uncontrolled growth of cars and motorbikes.

5. The fastest growing telecom network:

The phenomenal rate of growth of Pakistan's telecom industry is unheard of anywhere else in the world. Despite having a very small GDP per capita, Pakistan has succeeded in achieving cellular connections for fifty percent of the population, i.e. sixty million cellular connections within a span of a few years.

6. Tech power:

The level of technology in the computer connectivity and telecom sectors has, in many cases, been either equivalent to or better than even the most industrialized nations of the world. As an example, the first WiMax rolled out in the world was in Pakistan.

7. Pakistan joined the aerospace club by producing its own aircraft:

Pakistan is among the few countries in the world that produce its own aircraft. Thus, our aeronautical industry shares the likes of those in the US, France, China, Sweden.

8. Submarine production:

Pakistan has always been a shipbuilding country but has now started manufacturing submarines as well.

9. Largest ambulance service in the world:

Other than the impressive list of large NGOs and charities currently operating in the country, the Edhi Trust runs the largest ambulance network in the world and is completely free; it is run entirely on donations. Given the per capita income of the people of Pakistan, this is no small achievement.

10. State of the art teaching hospitals and research centers:

In medicine, not only have we have produced world class doctors that now practice all over the world, we also have state of the art medical facilities that offer services at a fraction of the cost that is charged for similar facilities elsewhere. To name a few, these facilities include Aga Khan, South City Hospital, SIUT, Shaukat Khanum Memorial Hospital, Burns Center, Kidney Center, Services Hospital Lahore and Indus Hospital among others.

To elaborate on some of the points mentioned above, I want to point out that Shaukat Khanum Hospital is the world's only free Cancer hospital. Similary, the Sindh Institute of Urology and Transplantation (SIUT) is the world's only kidney and liver transplant hospital that treats patients entirely free of cost.

These institutions did not come into being as a coincidence. Rather, hard work and visionary leadership have been the primary force behind these successful projects which is very typical of a lot of development work that is currently going on in Pakistan.

11. The Citizens Foundation:

It is a non-government funded charitable institution teaching over fifty thousand students in more than 600 schools in the poorest areas of the country. There is no parallel to this institution anywhere else in the world.

12. Land of the music legends:

Most of South Asia's master musicians in every genre are produced in Pakistan. Whether it is the world famous qawwali of Nusrat Fateh Ali Khan, the ghazals of Iqbal Bano, Farida Khanum or Mehdi Hassan, pioneers of pop music in the subcontinent such as Nazia and Zoheb Hassan or bands such as Junoon, Fuzon and Atif Aslam, it seems the only music produced in South Asia comes from Pakistan.

13. Art:

Pakistan has produced master artists such as Sadeqain, Abdur Rahman Chughtai, Ustad Allah Baksh, Shakir Ali and others whose work is not only recognized in this part of the world but is the predominant feature of many art auctions all over the world at Sothebys and Christies . Our artist are the product of a rich cultural heritage that dates back thousands of years.

14. A resilient judiciary:

Pakistan has an exemplary judicial system in place. Attacks have repeatedly been made to subdue and weaken it over the country's history, but each time this institution has stood its ground and come out stronger after every such attempt. In my opinion, no other judiciary in the world can compare to the resilience that Pakistan's judiciary has displayed time and again. Pakistan's current Chief Justice, Iftikhar Muhammad Chaudhary is a recipient of the Harvard Law School Medal of Freedom that has only been awarded to two other people in the school's history, Nelson Mandela and Charles Hamilton Houston.

I am actually guilty of not continuing this message any further as it has already become lengthier than what I think will be comfortable for most people to read. Otherwise, I could go on and on.

Sardar Ubaid Ur Rahman Boxer First Victory

Sardar Ubaid Ur Rahman Boxer first Victory