Kategoriler


SON YORUMLAR
spiderman
tatar ramazan ODTÜ ve Sakarya mezunları süper ama İTÜ mezunlarını kapıdan içeri almıyorlar diyorsun ben de tam tersini biliyorum İTÜ mezunları mezun olmadan iş buluyor havada kapıyorlar OdTÜ ve sakarya mezunları iş arıyorlar sektörü bilmesek ?
Ömer karikutal
Php,mvc asp.net, c # ödevleriniz uygun fiyata yapılır. karikutalomer@gmail.com
Ercan Sezdi
Donanimsal ödevlerinizi de yapabilirim. Raspberry pi, Ardiuno, Msp430 donanimsal programlama yapabilirim. Programlama dilleri C++, Python, Assembly olabilir. Zorluk derecesine gore mobil uygulama da yazabilirim. Iletisim: ercansezdi007@gmail.com
Ercan Sezdi
Elektrik elektronik mühendisliği okuyorum. Pyhon ve C++ ödevleri yapabilirim. Iletisim: ercansezdi007@gmail.com
Senior Dotnet Developer
Merhaba arkadaslar, Yazilan yorumlari bikmadan usanmadan okudum. Ssagdan soldan duyacaklariniz yerine gercek hayat hikayesinden baslayayim. Elk elktrnk muhendisi olarak 7 yilda 2.2 ortalama Uldag unv den mezun oldum. Sene 2010. Askere gidip geldim.1 sene de bos bos kahvede okey oynayarak gecirdim :)) is aradimmi? Hayir. Nasilsa yillarca calisacagiz diyerek keyfime daha cok zaman ayirdim. Hafif bir giristen sonra hizli bir giris olsun. Aldigim maaslari yazayim heyecanli olsun:) 1. Firma :1250- 6 ay (asgari ucret:900) 2. Firma : 2500-10 ay 3. Firma : 3000-1 yil 4. Firma : 4000-10 ay 5. Firma : 6000- 18 ay 6.Firma : 9000+ istanbul ?? henuz baslamadim :) Bu kadar detayi verdim ki biraz motive olun. 7 yilda farkli muhendislikten gelen biri buraya gelebilirse calisan herkes icin bu sans var. Bu firmalardan son 3 tanesi hergun duydugunuz yerler. 2 kez de 2 farkli yerde terfi aldim. Herkesin girmeye can attigi iyi maas veren yerler. Cok da gozunuzde buyutmeyin. He soylemeyi unuttum java diil .net developer olarak calisiyorum. Bu maaslar ile cok javaciyi geciyorum. Piyasayi baya iyi tanidim.Maas skalalarini vs. Size tavsiyem her duydugunuza inanmayin. Yok pahasina calismayin, fazla da ucmayin hersey dozunda guzel. Kisacik bir detay daha. 2012 de istanbula ilk geldigimde 3 haftada 21 yer ile gorusmustum. Gecen ay 2 haftada 20 yer ile gorustum. Piyasa 2012 den beri acik. Torpilsiz sadece calisarak buralara geldim.Ise giremiosaniz cv nize bakan yoksa oturup dusunmekte fayda var. Birsryleri eksik yapiorsunuz belki de. Not ::::::: Gecenin 2sinde tum bunlari yazdim ki birilerinr faydam olsun. Ne yazikki her kafadan bi ses cikiyor guzelim Turkiyemde. Bilenler atanlar tutanlar bol bol. 70 den fazla yer ile gorustum buyuk kucuk. 50 tanesinden olumsuz donus yada hic donus olmamistir. Sonucta buralara gelebildim. Gelecek bilisimde. Motivasyonunuz hic kirilmasin. Kalin saglicakla.
Memet
Katılım ödevim var yardıma ihtiyacım var yardımcı olabilecek var mı
Halil
Tatar Ramazan
Bizim Sakarya üniversitesinden iyi yerlere gelen bir sürü adam var. Hatta ödevleri yapmayan tembel bilinen biri katılım bankasına girdi şimdi de Avustralyada programcılık yapıyor. Kurumsal firmalarda her üniversiteden eleman vardır zaten. Mesela Ford Otosan. Çok da para vermez hepsi. Memur maaşına çalışırsın. General Elektrik gibi yerler yüksek maaş verebilir. Ama oralara girmek zordur. İşi de zordur. Ben 2010 yılında KPDS İngilizceden 89 almıştım. Süper bilişim uzmanıyım. İyi öğretim almak, Üniversitede bol proje yapmak kişiyi 1-0 öne geçirir. Veya ortalamada yüksek puanlı, öğretimi iyi olan üniversite mezunları daha başarılı olabilir. İtirazım yok. Ama istisnalar da her zaman mevcuttur. Kocaelinin birincisi elbette yıldızın sonuncusundan daha başarılı olacaktır.
No One
Tatar, sen neye atarlanıyorsun? Boş işler dediğin bütün hayatını etkileyecek kariyer planın ve senin bütün hayatın. Herkes her yere gelemez, kimse kimseyi kandırmasın, en öncelikle de kendini kandırmasın. Verdiğin örnekler istatistik orsnında yüzde kaç acaba? Mesela anadolu okulundan mezun kaç kişi iyi şirketlerde çalışıyor, büyük çoğunluk iş bulamıyor kendi tanıdıklarım var, ben üzerine diyorumki iyi okuldakiler de her yerde istediği gibi bulamıyor, sen burada montajcılık yaparken amerikalısı avrupalısı senin kullandığın teknolojileri üretiyor, senin yaptığın mühendislik mi montajcılık mı şimdi? Tr de en iyi şirketlerde çalışan farklı 10 üzeründe onlarca kişiye sor bakalım neyin dizaynını neyin teknolojisini üretmişler? Söylediğin bakan ingilterede yaşıyorsa sterlin olarak maaş alır 70bin tl diyerek manipule etme 6 ya böl, 11 bin sterlin de, tr de veriyorlarsa kim kime o kadar parayı veeiyor kaç tane bölüm birincisi o parayı alıyor saçmalama lütfen. Ben diyorumki birincil hedef herşeyini kariyere odaklama veya tamamen boşa salma, herkes bir şekilde yaşıyor hayatını zaten ancak neyi istiyorsa ona çabalasın ama bazı şeyler olmuyorsa da hayatını mutsuz geçirme. Sen mesela bırak dünya işlerini ahiretini yaşa diyorsun, milyonluk girişimcilik yapsan ve işlerin tıkırında gitseydi ve birçok hayalini gerçekleştirseydin şu anda beyler şunu şunu yapın hayat çok güzel diyecektin, şimdi gelmiş hayat boş diyorsun, komik. Benim yazdıklarımdan herkes ne demek istediğimi anlamıştır zaten, bazı şeyleri görmek için 40 yaşına gelmeye gerek yok, çok fazla araştırıp çok fazla kişiye sorarsan ve işin içinde bizzat bulunursan görüyorsun zaten ki yazdıklarım çok az şey olmasına rağmen anlaşışır özet bilgiler, seversin kullanırsın, sevmezsin saygı duyar ve okumazsın bu kadar basit.
ali
amk bilgisayar mühendsiliği nerden seçtim seni mis gibi kolay bölümler varken çekilir dert değil...... tavsiye etmiyorum kardeşim.
Tatar Ramazan
No One bırak boş işleri başlarım kariyerine de üniversitesine de! Dünyada bir halt olmadığını anlayın işte. Ahirete yatırım önemli. Herkes bir şekilde yükseliyor ilerde zaten. ODTÜ mezununun 26 yaşında geldiği noktaya Sakarya mezunu 33 yaşında geliyor. Ortalamada ne kadar çalıştıysan hayat sana o kadar verir. Mesele Karadeniz Teknik Maliye bitiren biri vardı. 29 yaşında vergi denetmeni oldu. Ankara Siyasal bitirseydi 22 yaşında işe girerdi. Eski bakan Mehmet Şimşek bölüm birincisi oldu. İngilterede 70 bin lira maaş alıyordu. Her şey ve herkes derece derece.
No One
Yeni mezun olarak birkaç küçük şey yazmak istiyorum, kariyer net veya linkedin deki iş ilanlarına bakarsanız, özellikle yeni mezun olanlar için bile min 2 yıl deneyim ve birçok programlama dilleri vs isterler. 5 kişi işe alınacaktır, 500 kişi başvurur. Her yere gereksiz sayıda birçok üniversite açıldı, avrupanın en kaliteli üniversiteleri ingiltere ve almanyada bile max 50 civarı, bizde ise 150-200 arasında bunun siyasi bazı sebepleri var. Mesela siz her il e üniversite açarsanız, tüm ailelerin çocukları üniversite mezunu olacaktır, çocuk ve aile pskolojikmen rahatlar. Esnaf ise öğrencilerden ciddi gelir elde edecektir. Sorun ise bizim gibi ülkelerde bilim veya teknoloji geri plandadır ve iş istihdamı azdır, mesela 100 kişi işe alınacaktır ancak açılan birçok üniversite ile 1000 kişi mezun olur ve kalan 900 kişi işe giremez, bu sayı her yıl daha da artar ve işsizlik artar, insanlar da artık üniversite mezunu olma fark yapmıyor master yapayım, part time çalışayım der, zaten birçoğu çok kalitesiz eğitim alır ve giriş maaşları 1500-3000 arasında olur yılları işsizlik veya düşük maaşla geçirir. Kişi de sorunu kendisinde sanır, halbuki tüm suç sistemin böyle olmasını sağlayanlar, anca siz yıllar sonra para ve zaman kaybınızı anlarsınız, veya anlasanız bile elinizden çok fazla birşey gelmez. Peki şirketler insanları neye göre seçer, kendini geliştir denilen tavsiye ne kadar doğru? Arz-talep dengesini iyi analiz etmelisiniz, mesela şu anda çok fazla mezun var, ekonomik kriz dolayısı ile iyi okuldan mezunlar bile zannettiğiniz gibi hemen iş bulamıyor. Ya top 5 okul dan 3+gpa ile mezun olacaksınız, ya da torpiliniz olacak. Ben top 5 okuldan mezunum ve okulun zorluğundan dolayı mezun olan herkesin onlarca projesi, jaca, c, c++, python, matlab gibi dilleri, birçok farklı ideleri, oop, mvc, design pstterns, ve çok farklı çeşitte algoritma çeşitleri görmelerine ve ingilizce seviyesinin çok iyi olmalarına rağmen (toefl a girenelerin çoğu 80-100 arası) ve alese girenlerin çoğu 80-95 arası aldığını düşünürseniz, yine de işe girerken sizi beğenmezler, benim gördüğüm kadarıyla şirketlerin insan seçerken yaptıkarı sıralama şu şekilde, 1- okul ismi (boun, koç, itü, odtü, bilkent top 5, ytü, sabancı, tobb, hacettepe vs gibi ikincil seviye okullar, diğerleri daha geri planda, her şirketin kendince filtreleme sistemi var ve bazı okul mezunlarını asla almazlar) 2- gpa ortalama (kurumsal veya büyük şirketler savunma, telekom, banka vs hepsi önem verir, master yapmak istiyorsanız birinci kriterdir, küçük teknokent şirketlerinden de soran çok oluyor ben ve arkadaşlarıma staj için bile) 3- ingilizce (iyi okulların çoğunun ingilizce seviyesi upper dır, ingilizceniz yoksa bilgisayarcı sayılmazsınız) 4- yaptığınız projeler, staj, part time, iş deneyimi (bazı şirketler ilanlarda iyi yerde staj yapmış olma koşulu koyar, iş yaptığınız sektörde staj yapmanızı beklerler vs, 2017 den beri birçok şirket kurumsal ve normal hemen hemen hepsinde artık staj yapmak bile zordur, ya gpa 3+ olacak, ya da torpiliniz, top5 okuldaki ben ve birçok arkadaşım staj bulmada zorlandı, top5 te değilseniz part time veya normal iş tecrübesi sizi direk öne atar, iyi okuldakilerin çoğu derslerinde projeler çok ve zordur, o yüzden diğer okuldakilerin aradaki açığı iş tecrübesi ve hobby projelerle kapatması lazım) 5-referans (okuldaki hocanız veya staj, iş yerindeki mühendisin işe girerken size olumlu referans olması, şu anda yeni mezunlardan 2-3 tane referans istiyor birçok şirket 6-diğerleri, aklıma gelmeyen diğer işler, sosyal sorumluluk, klüp, sertifika, yarışma vs bunlara önem veren ik cı veya şirketler olabiliyor cv nin kenarında durması işe yarayabilir 0- torpil, çevreden veya akraba aile tanıdık ile torpiliniz var ise diğer herşeyden etkili hale gelip herkesin önüne geçebilirsiniz, batıda iş liyakat veya işi en iyi yapana verilir. Doğu toplumlarında ise iş güvenilir kişi ile yapılır, o yüzden tanıdıkları işe alırlar, şirket gizliliği ve güvenliği bazı şirketler için çok sıkıntılı olabiliyor vs, bu kozu olan çok fazla insan var piyasada, o yüzden siz bunlardan birisi değilseniz yukarıdaki beş maddenin hepsini yükseltmeye bakın. İyi okul hiçbirşey mi, veya herşey mi? Top5 ten gpa 2.0 - 2.5 arasında mezun olursanız biraz zor günler sizi bekliyor, master yapamazsınız, paranız yoksa yurt dışına gidemezsiniz, çok ağır ders ve projeler yaptınız ama okulu zor bitirdiniz ve dışarıdaki şirketler size çok önem vermeyebilir, iş bulurken ve bulduktan sonra da min 1 yıl falan zorluk çekersiniz, ilk başlarda iyi kurumsaldan başlamak zordur İyi okul mezunu Gpa 2.5-3.0 arası, savunmaya girmek zorlar, onun dışında bazı kurumsallara ilk başta giremezsiniz ama bazılarına girebilirsiniz, master içinde şartlar biraz zorlar İyi okul mezunu 3gpa+ ile master veya iş bulmak daha kolaydır ancak okuldaki zorluklardan sonra hiçbir zaman tatmin olamayabilirsin, çünkü hayat üniversitede zor projelerle uğraşırken kurduğun hayaller gibi değilmiş onu işe girince öğreniyorsun Diğer okullardan mezunlar, okulda gezip tozduysanız çok güzel, en güzel yıllarınız o yıllardı, zor okuldakiler kadar çalışmadınız ve gençliğiniz full çalışmayla geçmediyse iş hayatı ilk birkaç yıl zorlar, sonrasında kurumsal şirketlerin bazılarında hatta çoğunda devam edebilirsiniz belki (2-3 yıl sonra girenler var oran olarak bilmiyorum, bazı şirketlere çok zor) Yaş 28-30 üstü ise, srtık iş bulmak yeni mezun kadar zordur, çünkü maaş beklentisi fazla ancak şirketler siz ne kadar kaiteli olursanız olun sizden daha ucuza çalışacak birisini bulabiliyor, maaş zamları veya artışı düşük, tl nin alım gücü her seferinde düşüyor, kaygılar çocuk varsa dahada fazla Yurt dışına mastera gitsenizde, phd yapsanızda yaş ilerliyor, 30 una yaklaştığında hala öğrenci gibi takılmak zorunda olmak, avrupada 2-3-4 bin euro ya yaşamak, hangi ara evleneceksin, ev veya araba alacaksın, geri.dönecek misin, hayatın boyunca atomu mu parçalayacaksın? Tr dekiler en azından atom parçalamıyor Sonuçta top5 okuldan yeni mezun, tr de yine top şirketlerin birinde ben ve çoğu arkadaşım 3.5-4.5k ya başladık, savunmadakiler 5k üstü, ancak tavsiye verecek olursam, tünelin ucu bmbk bir yere çıkıyor. Hayatınızı doya doya yaşayın, çok zengin olmadığınız sürece para o kadar önemli değil, ben daha 22-25 yaşındayım (tam yaşım belli olmasın diye) ve umutsuzum bazı şeyler için, hayatınızı ev veya araba almaya mı harcamak istiyorsunuz, büyük şehirde zar zor yaşamaya mı? Öğrenciyken anlamanız pek mümkün değil kapitalist sistemin içine girip para kazanmaya başlayınca, insanların nasıl davrandıklarını çok daha net anlıyorsunuz, okuyun, gezin, eğlenin, anı yaşayın. Ne çok çalışın, ne de çok tembellik edin, herşeyi dozunda yaşayın. Daha çoook şey yazardım da boşver
Tatar Ramazan
Adam ÖSS ilk 3000 e girdi İTÜ mezunu doğru dürüst bir yere giremedi. ilk işini 26 yaşında buldu. O da kıytırık bir firma. Ekmek arslanın kuyruğuna indi. Siz ne bekliyorsunuz? Firmalar kollarını açtılar sizi bekliyorlar. :) :) :)
yazilimci
Java, C/C++, python ve bilgisayar müh. derslerinizin ödevleri garantili yapılır, yazilimcialper@gmail.com

Bilgisayar Mühendisleri
Here is the website inspired me to use 
it as a guide when I tried to define 
myself as an engineer candidate a few 
years ago. It really helped me to work
 and study feeling in confidence with 
being on the right way. I suggest this 
website to whom it may direct her/his 
to find the right career path. It 
includes many articles varies from 
real life experiences to detailed 
software engineering issues. But the 
most dignified parts for me are the 
articles in general and career titles.
Son okunan makaleler:
Asp.net - Questions and answers - FAQ
Installing ASP.NET
Asp.Net 2.0 ve Client Script Callback
Bilgisayar Mühendisliği Hakkındaki 10 Büyük Yalan!
Bilgisayar Mühendisi olacaklara üniversite seçme rehberi?
PHP Geliştirme Ortamı - Zend Studio
Bilgisayar Mühendisleri Ne İster?
Bill Gates Emekli Oldu
VNC Nedir? (Virtual Network Computing)
ASP.NET ile GIS Uygulamaları
Online Java Dersleri - Javada Sınıfların Tekrar Kullanılması
DOKTOR GİBİ BİLGİSAYAR MÜHENDİSİ OLMAK
Dizin (Directory) ve LDAP (Lightweight Directory Access Protocol) Kavramları
Bilgisayar Mühendisi Ne İş yapar? Program Nedir? Çeşitli Sorular?
Microsoft Doktora Yapanlara Yıllık 33 Euro Burs Veriyor.
Imagine Cup 2007 Yazılım Tasarımı Türkiye Finalist'leri Belirlendi
Imagine Cup 2007 Yazılım Tasarımı Türkiye Finalist'leri Belirlendi
Imagine Cup 2007 Yazılım Tasarımı Türkiye Finalist'leri Belirlendi
Google'da Engineering Manager olarak çalışan Niniane Wang ile çok güzel bir röportaj
Bilgisayar Mühendisleri Kaç Para Alır?

Bilgisayar Mühendisleri Portalı

Asp.net - Questions and answers - FAQ

 
 2.1 What is ASP.NET?
 2.2 Why does my ASP.NET file have multiple <form> tag with runat=server?
 2.3 How to find out what version of ASP.NET I am using on my machine?
 2.4 Is it possible to pass a querystring from an .asp page to aspx page?
 2.5 How to comment out ASP.NET Tags?
 2.6 What is a ViewState?
 2.7 Where can I get the details on Migration of existing projects using various technologies to ASP.NET?
 2.8 What is the equivalent of date() and time() in ASP.NET?
 2.9 How to prevent a button from validating it's form?
 2.10 How to get the IP address of the host accessing my site?
 2.11 How to access the Parameters passed in via the URL?
 2.12 How to Set Focus to Web Form Controls By Using Client-Side Script?
 2.13 How to display a Wait page while a query is running?
 2.14 How to implement Form based Authentication in ASP.NET application?
 2.15 How to catch the 404 error in my web application and provide more useful information?
 2.16 Is there a method similar to Response.Redirect that will send variables to the destination page other than using a query string or the post method?
 2.17 What are the differences between HTML versus Server Control?
 2.18 How can I change the action of a form through code?
 2.19 Is there any control that allows user to select a time from a clock - in other words is there a clock control?
 2.20 How to Compare time?
 2.21 How To work with TimeSpan Class?
 2.22 Where can I get information on Cookies in ASP.NET?
 2.23 Does ASP.Net still recognize the global.asa file?
 2.24 How should I destroy my objects in ASP.Net?
 2.25 Are there resources online with tips on ASP to ASP.Net conversions?
 2.26 How do I publish my ASP.NET application to my ISP's web server?
 2.27 Why do i get error message "Could not load type" whenever I browse to my ASP.NET web site?
 2.28 Will the WebMatrix SqlDataSourceControl work with a MySQL connection?
 2.29 Can I combine classic ASP and ASP.NET pages?
 2.30 What is the difference between src and Code-Behind?
 2.31 How can I get the value of input box with type hidden in code-behind?
 2.32 I have created a .NET user control page (.ascx) but I cannot compile and run it.
 2.33 What is a .resx file?
 2.34 Is it possible to use a style sheet class directly on a control instead of using inline or page-level formatting ?
 2.35 Can I recieve both HTML markup for page and code in the ASP.NET web page's source code portion in the Web browser?
 2.36 Why can't I put <%@ Page Language="C " %> where at the top of an ASPX file and write my server-side scripts in C ?
 2.37 ASP pages that worked pefectly on Windows 2000 Server and IIS 5.0 do not work on Windows 2003 Server with IIS 6.0. ASP.NET pages work fine. Why?
 2.38 Why do I get error message "Error creating assembly manifest: Error reading key file 'key.snk' -- The system cannot find the file specified"?
 2.39 How to get URL without querystring?
 2.40 What is the best way to output only time and not Date?
 2.41 Do I have to compile code if I am changing the content of my aspx.cs file?
 2.42 How to grab the referring URL?
 2.43 My ASP code gives an error "Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed" when changed to .aspx?
 2.44 How can I save images ?
 2.45 How can I logout when using FormsAuthentication?
 2.46 Why do I get a blank page when I use Server.Transfer("page1.htm") to transfer to a different page?
 2.47 How to detect the User's culture?
 2.48 What is the difference between CurrentCulture property and the CurrentUICulture property?
 2.49 Can I read the hard disk serial # of the client computer using ASP.NET?
 2.50 What is xxx(src As Object, e As EventArgs)?
 2.51 What is the difference between Absolute vs Relative URLs?
 2.52 What is the difference between URL and URI?
 2.53 How to convert milliseconds into time?
 2.54 How to include multiple vb/cs files in the source?
 2.55 How to convert a string to Proper Case?
 2.56 How can I ensure that application-level variables are not updated by more than one user simultaneously?
 2.57 Why do I get the error message "System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a ...."?
 2.58 How to validate that a string is a valid date?
 2.59 Are namespaces and Class names Case Sensitive?
 2.60 How to convert string to a DateTime and compare it with another DateTime?
 2.61 How to get the url of page dynamically?
 2.62 How to convert user input in dMy format to Mdy?
 2.63 When the User is prompted a File Download dialogbox, if the user selects "Save" then the "Save as" dialog box is displayed. Is there any way for me to retrieve the filename and directory path specified by the user on the File Download dialog box?
 2.64 How to hide or show Controls in server side code?
 2.65 How to check if the user is using a secure or non secure connection?
 2.66 Is it possible to write code in many languages in one ASP.NET project?
 2.67 What is the difference between Response.Redirect() and Server.Transfer().
 2.68 How to get the hostname or IP address of the server?
 2.69 What is the meaning of validateRequest=true in .net framework1.1?
 2.70 What is the different between <%# %> and <%= %>?
 2.71 What permissions do ASP.NET applications posses by default?
 2.72 How can I specify the relative path for a file?
 2.73 How can I specify the "upload a file" input textbox in a form to be read only so that the user can click on the browse button and pick a file but they cannot type anything into the textbox next to the browse button.
 2.74 How to change the Page Title dynamically?
 2.75 Why do I get the error message "Object must implement IConvertible". How can I resolve it?
 2.76 Why is default.aspx page not opened if i specify http://localhost. I am able to view this page if i hardcode it as http://localhost/default.aspx?
 2.77 Can ASP.NET work on an NT server?
 2.78 Is it possible to migrate Visual InterDev Design-Time Controls to ASP.NET?
 2.79 How to automatically get the latest version of all the asp.net solution items from Source Safe when opening the solution?
 2.80 How to convert the datetime into a string for use in the SQL ' statement?
 2.81 How to make VS.Net use FlowLayout as the default layout rather than the GridLayout?
 2.82 Can I use a DataReader to update/insert/delete a record?
 2.83 What is the difference between Server.Transfer and Server.Execute?
 2.84 How to create a login screen in ASP.NET?
 2.85 How to format a Telphone number in the xxx-xxx-xxxx format?
 2.86 Can two different programming languages be mixed in a single ASPX file?
 2.87 Can I use custom .NET data types in a Web form?
 2.88 How can I have a particular Web page in an ASP.NET application which displays its own error page.



2.1 What is ASP.NET?

 

ASP.NET is a programming framework built on the common language runtime that can be used on a server to build powerful Web applications.

For more details refer

 


2.2 Why does my ASP.NET file have multiple <form> tag with runat=server?

 

This means that ASP.Net is not properly registered with IIS.
.Net framework provides an Administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single machine. You can find the file in C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe

 
use the command: aspnet_regiis.exe -u ---> to uninstall current asp.net version.
use the command: aspnet_regiis.exe -i ---> to install current asp.net version.
 

For Windows Server 2003, you must use aspnet_regiis -i -enable
This is because of the "Web Service Extensions" feature in IIS 6

(if you install VS.NET or the framework without IIS installed, and then go back in and install IIS afterwards, you have to re-register so that ASP.NET 'hooks' into IIS properly."


2.3 How to find out what version of ASP.NET I am using on my machine?

 

VB.NET

 
Response.Write(System.Environment.Version.ToString() )
 

C#

 
Response.Write(System.Environment.Version.ToString() );
 

 


2.4 Is it possible to pass a querystring from an .asp page to aspx page?

 

Yes you can pass querystring from .asp to ASP.NET page .asp

 
<%response.redirect "webform1.aspx?id=11"%>
 

.aspx
VB.NET

 
Response.Write (Request("id").ToString ())
 

C#

 
Response.Write (Request["id"].ToString ());
 

 


2.5 How to comment out ASP.NET Tags?

 

 

 
<%--<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 48px" runat="server">Label</asp:Label>--%>
 

 


2.6 What is a ViewState?

 

In classic ASP, when a form is submitted the form values are cleared. In some cases the form is submitted with huge information. In such cases if the server comes back with error, one has to re-enter correct information in the form. But submitting clears up all form values. This happens as the site does not maintain any state (ViewState).

In ASP .NET, when the form is submitted the form reappears in the browser with all form values. This is because ASP .NET maintains your ViewState. ViewState is a state management technique built in ASP.NET. Its purpose is to keep the state of controls during subsequent postbacks by the same user. The ViewState indicates the status of the page when submitted to the server. The status is defined through a hidden field placed on each page with a <form runat="server"> control.

 
<input type="hidden" name="__VIEWSTATE" value="dDwyNTA3OTU0NDM7Oz7t5TntzkOUeB0QVV6FT2hvQwtpPw==" />
 

If you want to NOT maintain the ViewState, include the directive <%@ Page EnableViewState="false"%> at the top of an .aspx page If you do not want to maintain Viewstate for any control add the attribute EnableViewState="false" to any control. For more details refer The ASP.NET View State


2.7 Where can I get the details on Migration of existing projects using various technologies to ASP.NET?

 

Microsoft has designed Migration Assistants to help us convert existing pages and applications to ASP.NET. It does not make the conversion process completely automatic, but it will speed up project by automating some of the steps required for migration.
Below are the Code Migration Assistants

  • ASP to ASP.NET Migration Assistant
  • PHP to ASP.NET Migration Assistant
  • JSP to ASP.NET Migration Assistant
Refer Migrating to ASP.Net

 


2.8 What is the equivalent of date() and time() in ASP.NET?

 

VB.NET

 
System.DateTime.Now.ToShortDateString()
System.DateTime.Now.ToShortTimeString()
 

C#

 
System.DateTime.Now.ToShortDateString();
System.DateTime.Now.ToShortTimeString();
 

 


2.9 How to prevent a button from validating it's form?

 

Set the CauseValidation property of the button control to False


2.10 How to get the IP address of the host accessing my site?

 

VB.NET

 
Response.Write (Request.UserHostAddress.ToString ())
 

C#

 
Response.Write (Request.UserHostAddress.ToString ());
 

 


2.11 How to access the Parameters passed in via the URL?

 

Call the Request.QueryStringmethod passing in the key. The method will return the parameter value associated with that key. VB.NET

 
Request.QueryString("id")
 

C#

 
Request.QueryString["id"];
 

 


2.12 How to Set Focus to Web Form Controls By Using Client-Side Script?

 

 

 
<script language="javascript">
function SetFocus()
{
// W3C approved DOM code that will work in all modern browsers
 if (document.getElementById)
 document.getElementById('txt2').focus();
 else
// To support older versions of IE:
 if (document.all)
 document.all("txt2").focus();
 return false;
}
</script>
 

 

 
<body MS_POSITIONING="GridLayout" onload="SetFocus()">
<form id="Form1" method="post" runat="server">
 Enter 1:
<asp:TextBox ID="txt1" Runat="server" Width="50" />
<br>
 Enter 2:
<asp:TextBox ID="txt2" Runat="server" Width="50" />
<br>
<asp:Button id="Button1" runat="server" Text="Button1"></asp:Button>
</form>
</body>
 

Refer Sample IE Code


2.13 How to display a Wait page while a query is running?

 

Refer Asynchronous Wait State Pattern in ASP.NET


2.14 How to implement Form based Authentication in ASP.NET application?

 

For

 


2.15 How to catch the 404 error in my web application and provide more useful information?

 

In the global.asax Application_error Event write the following code

VB.NET

 
Dim ex As Exception = Server.GetLastError().GetBaseException()
If TypeOf ex Is System.IO.FileNotFoundException Then
'your code
'Response.Redirect("err404.aspx")
Else
'your code
End If
 

C#

 
Exception ex = Server.GetLastError().GetBaseException();
if (ex.GetType() == typeof(System.IO.FileNotFoundException))
{
//your code
 Response.Redirect ("err404.aspx");
}
else
{
//your code
}
 

 


2.16 Is there a method similar to Response.Redirect that will send variables to the destination page other than using a query string or the post method?

 

 

Server.Transfer preserves the current page context, so that in the target page you can extract values and such. However, it can have side effects; because Server.Transfer doesnt' go through the browser, the browser doesn't update its history and if the user clicks Back, they go to the page previous to the source page.

Another way to pass values is to use something like a LinkButton. It posts back to the source page, where you can get the values you need, put them in Session, and then use Response.Redirect to transfer to the target page. (This does bounce off the browser.) In the target page you can read the Session values as required.

Refer to Passing Values Between Web Forms Pages for more information.


2.17 What are the differences between HTML versus Server Control?

 

Refer

 


2.18 How can I change the action of a form through code?

 

You can't change it. The action attribute is owned by ASP.NET. Handle Events and Transfer.

For work around refer to Paul Wilson's Multiple Forms and Non-PostBack Forms - Solution


2.19 Is there any control that allows user to select a time from a clock - in other words is there a clock control?

 

Peter Blum has developed some controls. Check out Peter's Date Package: TimeOfDayTextBox and DurationTextBox Controls


2.20 How to Compare time?

 

VB.NET

 
Dim t1 As String = DateTime.Parse("3:30 PM").ToString("t")
Dim t2 As String = DateTime.Now.ToString("t")
If DateTime.Compare(DateTime.Parse(t1), DateTime.Parse(t2)) < 0 Then
 Response.Write(t1.ToString() & " is < than " & t2.ToString())
Else
 Response.Write(t1.ToString() & " is > than " & t2.ToString())
End If
 

C#

 
string t1 = DateTime.Parse("3:30 PM").ToString("t");
string t2 = DateTime.Now.ToString("t");
if (DateTime.Compare(DateTime.Parse (t1), DateTime.Parse (t2)) < 0 )
{
 Response.Write(t1.ToString() + " is < than " + t2.ToString());
}
else
{
 Response.Write(t1.ToString() + " is > than " + t2.ToString());
}
 

 


2.21 How To work with TimeSpan Class?

 

VB.NET

 
Dim adate As DateTime = DateTime.Parse("06/24/2003")
Dim bdate As DateTime = DateTime.Parse("06/28/2003")
Dim ts As New TimeSpan(bdate.Ticks - adate.Ticks)
Response.Write(ts.TotalDays & "<br>")
Response.Write(ts.TotalHours & ":" & ts.TotalMinutes & ":" & ts.TotalSeconds & ":" & ts.TotalMilliseconds)
 

C#

 
DateTime adate = DateTime.Parse("06/24/2003");
DateTime bdate = DateTime.Parse("06/28/2003");
TimeSpan ts = new TimeSpan (bdate.Ticks - adate.Ticks);
Response.Write(ts.TotalDays.ToString () + "<br>");
Response.Write(ts.TotalHours.ToString() + ":" + ts.TotalMinutes.ToString() + ":" + ts.TotalSeconds.ToString() + ":" + ts.TotalMilliseconds.ToString() );
 

 


2.22 Where can I get information on Cookies in ASP.NET?

 

Refer Mike Pope's article Basics of Cookies in ASP.NET


2.23 Does ASP.Net still recognize the global.asa file?

 

ASP.Net does not recognize the standard ASP global.asa file. Instead it uses a file named global.asax with the same - plus additional - functionality.


2.24 How should I destroy my objects in ASP.Net?

 

ASP.Net actually has very solid internal garbage collection. So this is not an issue as it was in previous versions of Active Server Pages.
Link to more information: <gcConcurrent> Element


2.25 Are there resources online with tips on ASP to ASP.Net conversions?

 

Microsoft has deisnged The ASP to ASP.NET Migration Assistant help us convert ASP pages and applications to ASP.NET. It does not make the conversion process completely automatic, but it will speed up project by automating some of the steps required for migration.

The following Code Migration Assistants are discussed in the link below.

  • ASP to ASP.NET Migration Assistant
  • PHP to ASP.NET Migration Assistant
  • JSP to ASP.NET Migration Assistant
Refer Migrating to ASP.Net

Also refer:

 


2.26 How do I publish my ASP.NET application to my ISP's web server?

 

Your ISP must first create an IIS application and apply the Front Page Server Extensions to it. Then in Visual Studio .NET, select the "Project | Copy Project" menu. Then enter the URL and select the FrontPage web access method. The "Copy Project" feature copies all of the necessary files to your ISP's machine for your ASP.NET application to run.

You can also FTP your files to your ISP web server. But you must know which files to upload. For more details refer PRB: Remote ASP.NET Projects Require IIS on the Client Computer or FrontPage Server Extensions on the Server Computer


2.27 Why do i get error message "Could not load type" whenever I browse to my ASP.NET web site?

 

Your code-behind files for either your .aspx or the global.aspx page have not been complied. Use Visual Studio .NET's "Build | Build Solution" menu, or run the command line compiler.

For more details refer PRB: "Could not load type" error message when you browse to .aspx page


2.28 Will the WebMatrix SqlDataSourceControl work with a MySQL connection?

 

SqlDataSourceControl lets you connect and work with MS SQL DB, while AccessDataSourceControl do the same thing but for MS Access DB. Therefore SqlDataSourceControl can't help you in your MySql connectivity .
For Connectivity with MySql refer Accessing MySQL Database with ASP.NET


2.29 Can I combine classic ASP and ASP.NET pages?

 

No.
ASP pages can run in the same site as ASP.NET pages, but you can't mix in a page. Also ASP and ASP.NET won't share their session.


2.30 What is the difference between src and Code-Behind?

 

Src attribute means you deploy the source code files and everything is compiled JIT (just-in-time) as needed. Many people prefer this since they don't have to manually worry about compiling and messing with dlls -- it just works. Of course, the source is now on the server, for anyone with access to the server -- but not just anyone on the web.

CodeBehind attribute doesn't really "do" anything, its just a helper for VS.NET to associate the code file with the aspx file. This is necessary since VS.NET automates the pre-compiling that is harder by hand, and therefore the Src attribute is also gone. Now there is only a dll to deploy, no source, so it is certainly better protected, although its always decompilable even then.


2.31 How can I get the value of input box with type hidden in code-behind?

 

You can set the runat= server for the hidden control and you can use ControlName.Value to get its value in CodeBehind file


2.32 I have created a .NET user control page (.ascx) but I cannot compile and run it.

 

User control (ascx) can't be run on it own, but you can drag it onto any web page (aspx) and then run it.


2.33 What is a .resx file?

 

The .resx resource file format consists of XML entries, which specify objects and strings inside XML tags. This is useful for localization. For more details refer Resources in .resx files


2.34 Is it possible to use a style sheet class directly on a control instead of using inline or page-level formatting ?

 

Every WebControl derived control has a CssClass property which allows you to set it's format to a style sheet.


2.35 Can I recieve both HTML markup for page and code in the ASP.NET web page's source code portion in the Web browser?

 

No. The Web browser recieves only HTML markup.
No source code or web control syntax is passed back to the web browser.


2.36 Why can't I put <%@ Page Language="C " %> where at the top of an ASPX file and write my server-side scripts in C ?

 

The parsers ASP.NET uses to extract code from ASPX files understand C#, Visual Basic.NET, and JScript.NET. You can write server-side scripts in any language supported by a .NET compiler.


2.37 ASP pages that worked pefectly on Windows 2000 Server and IIS 5.0 do not work on Windows 2003 Server with IIS 6.0. ASP.NET pages work fine. Why?

 

Start -> Settings -> Control Panel -> Administrative Tools -> and double clicking IIS Manager.
Go to the Web Service Extensions tab, click Active Server Pages, then press the "Allow" button on the left


2.38 Why do I get error message "Error creating assembly manifest: Error reading key file 'key.snk' -- The system cannot find the file specified"?

 

Check the location of the key.snk file relative to the assembly file. Provide an explicit path or a relative path.

 
<Assembly: AssemblyKeyFileAttribute("Drive:\key.snk")>
 

 


2.39 How to get URL without querystring?

 

VB.NET

 
Dim stringUri As String = "http://www.syncfusion.com/?id=1&auid=16"
Dim weburi As Uri = New Uri(stringUri)
Dim query As String = weburi.Query
Dim weburl As String = stringUri.Substring(0, stringUri.Length - query.Length)
Response.Write(weburl)
 

C#

 
string stringUri = "http://www.syncfusion.com/?id=1&auid=16";
Uri weburi = new Uri(stringUri);
string query = weburi.Query;
string weburl = stringUri.Substring(0, stringUri.Length - query.Length);
Response.Write (weburl);
 

 


2.40 What is the best way to output only time and not Date?

 

Use DateTime as follows VB.NET

 
Response.Write(DateTime.Now.ToString("hh:mm:ss"))
 

C#

 
Response.Write(DateTime.Now.ToString("hh:mm:ss"));
 

 


2.41 Do I have to compile code if I am changing the content of my aspx.cs file?

 

Yes if you have used Codebehind="my.aspx.cs".
Not if you used src="my.aspx.cs" in your page declaration.


2.42 How to grab the referring URL?

 

VB.NET

 
Response.Write ( Request.UrlReferrer.ToString())
 

C#

 
Response.Write ( Request.UrlReferrer.ToString());
 

 


2.43 My ASP code gives an error "Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed" when changed to .aspx?

 

Use a <script runat=server> block instead of the <% %> syntax to define Subs.
Make sure you have proper events associated with the code and have start and end of procedure or function wirtten properly.


2.44 How can I save images ?

 

You need a stream to read the response, WebResponse.GetResponseStream(), and a stream to write it to the hard drive. FileStream should do the trick. You'll have to write to the filestream what you read from the response stream.


2.45 How can I logout when using FormsAuthentication?

 

VB.NET

 
FormsAuthentication.SignOut()
 

C#

 
FormsAuthentication.SignOut();
 

 


2.46 Why do I get a blank page when I use Server.Transfer("page1.htm") to transfer to a different page?

 

Server.Transfer only works with .aspx pages
You can't use Transfer method with HTML pages


2.47 How to detect the User's culture?

 

VB.NET

 
Dim sLang As String
sLang = Request.UserLanguages(0)
Response.Write(sLang)
 

C#

 
string sLang ;
sLang = Request.UserLanguages[0];
Response.Write (sLang);
 

 


2.48 What is the difference between CurrentCulture property and the CurrentUICulture property?

 

 

  • CurrentCulture property : affects how the .NET Framework handles dates, currencies, sorting and formatting issues
  • CurrentUICulture property : determines which satellite assembly is used when loading resources

 


2.49 Can I read the hard disk serial # of the client computer using ASP.NET?

 

No. Such information is not passed to the server with a http request.


2.50 What is xxx(src As Object, e As EventArgs)?

 

xxx is an event handler
src is the object that fires the event
e is an event argument object that contains more information about the event
An event handler is used when one object wants to be notified when an event happens in another object


2.51 What is the difference between Absolute vs Relative URLs?

 

Absolute /Fully Qualified URLs:

  • Contain all information necessary for the browser(or other client program) to locate the resource named in the URL
    • This includes protocol moniker used( i.e http://, ftp://..etc..), Server's Domain name or IP address and the file path
    • Absolute URL looks as http://localhost/syncfusion/page1.aspx
Relative URLs:
  • Only provide information necessary to locate a resource relative to the current document(document relative) or current server or domain(root relative)
    • Document relative URL - page1.aspx
    • Root Relative URL - /syncfusion/Admin/pagelog.aspx

 


2.52 What is the difference between URL and URI?

 

A URL is the address of some resource on the Web, which means that normally you type the address into a browser and you get something back. There are other type of resources than Web pages, but that's the easiest conceptually. The browser goes out somewhere on the Internet and accesses something.

A URI is just a unique string that uniquely identifies something, commonly a namespace. Sometimes they look like a URL that you could type into the address bar of your Web browser, but it doesn't have to point to any physical resource on the Web. It is just a unique set of characters, that, in fact, don't even have to be unique.

URI is the more generic term, and a URL is a particular type of URI in that a URL has to uniquely identify some resource on the Web.


2.53 How to convert milliseconds into time?

 

VB.NET

 
dim ts as TimeSpan = TimeSpan.FromMilliseconds(10000)
Response.Write (ts.ToString () )
 

C#

 
TimeSpan ts = TimeSpan.FromMilliseconds(10000);
Response.Write (ts.ToString () );
 

 


2.54 How to include multiple vb/cs files in the source?

 

You can do this using assembly directives.

 
<%@ assembly src="test1.vb" %>
<%@ assembly src="test2.vb" %>
 
or
 
<%@ assembly src="test1.cs" %>
<%@ assembly src="test2.cs" %>
 

However, note that each source file will be compiled individually into its own assembly, so they cannot have dependencies on each other.


2.55 How to convert a string to Proper Case?

 

Use the namespace System.Globalization
VB.NET

 
Dim myString As String = "syncFusion deVeloPer sUppOrt"
' Creates a TextInfo based on the "en-US" culture.
Dim TI As TextInfo = New CultureInfo("en-US", False).TextInfo
Response.Write(TI.ToTitleCase(myString))
 

C#

 
string myString = "syncFusion deVeloPer sUppOrt";
// Creates a TextInfo based on the "en-US" culture.
TextInfo TI = new CultureInfo("en-US",false).TextInfo;
Response.Write (TI.ToTitleCase( myString ));
 

For more details refer TextInfo.ToTitleCase()


2.56 How can I ensure that application-level variables are not updated by more than one user simultaneously?

 

Use the HttpApplicationState's Lock and UnLock methods.

For more details refer : MSDN: Application State


2.57 Why do I get the error message "System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a ...."?

 

You can't use MsgBox or MessageBox.Show in ASP.NET WebForm. You maybe use:
VB.NET

 
Response.Write("<script>alert('Hello');</script>")
 

C#

 
Response.Write("<script>alert('Hello');</script>") ;
 

 


2.58 How to validate that a string is a valid date?

 

VB.NET

 
Dim blnValid As Boolean = False
Try
 DateTime.Parse(MyString)
 blnValid = True
Catch
 blnValid = False
End Try
 

C#

 
bool blnValid=false;
try
{
 DateTime.Parse(MyString);
 blnValid=true;
}
catch
{
 blnValid=false;
}
 
 

 


2.59 Are namespaces and Class names Case Sensitive?

 

Namespaces and Class names are case Sensitive. Namespaces imported using the @ Import Directive will cause an error if the correct case is not used.


2.60 How to convert string to a DateTime and compare it with another DateTime?

 

VB.NET

 
Dim blntimeIsOk As Boolean = DateTime.Parse("15:00") < DateTime.Parse("08:00")
Response.Write(blntimeIsOk)
 

C#

 
bool blntimeIsOk = (DateTime.Parse("15:00") < DateTime.Parse("08:00"));
Response.Write (blntimeIsOk);
 

 


2.61 How to get the url of page dynamically?

 

Use Request.Url property


2.62 How to convert user input in dMy format to Mdy?

 

VB.NET

 
Dim dt As DateTime = DateTime.ParseExact("0299", New String() {"My", "M/y"}, Nothing, System.Globalization.DateTimeStyles.None)
 

C#

 
DateTime dt = DateTime.ParseExact("0299", new string[] {"My","M/y"}, null,System.Globalization.DateTimeStyles.None);
 

For more details refer DateTime.ParseExact


2.63 When the User is prompted a File Download dialogbox, if the user selects "Save" then the "Save as" dialog box is displayed. Is there any way for me to retrieve the filename and directory path specified by the user on the File Download dialog box?

 

Clients do not report information back about where the user selects to save the content, so there isn't an easy way to do this. Instead, you would need to ask the user before using the content-disposition for a file path, and then you could specify the filename parameter for the content-disposition header. Still, the user is free to change that path when actually downloading.


2.64 How to hide or show Controls in server side code?

 

In any appropriate event write
VB.NET

 
TextBox1.Visible =not TextBox1.Visible
 

C#

 
TextBox1.Visible =!TextBox1.Visible ;
 

 


2.65 How to check if the user is using a secure or non secure connection?

 

The Request Object defines a Property called IsSecureConnection, that will indicate whether http:// or https:// has been used.


2.66 Is it possible to write code in many languages in one ASP.NET project?

 

You cannot write the code-behind files in different languages in the same project, but you can write the aspx pages and ascx controls in different languages.


2.67 What is the difference between Response.Redirect() and Server.Transfer().

 

Response.Redirect

  • Tranfers the page control to the other page, in other words it sends the request to the other page.
  • Causes the client to navigate to the page you are redirecting to. In http terms it sends a 302 response to the client, and the client goes where it's told.
Server.Transfer
  • Only transfers the execution to another page and during this you will see the URL of the old page since only execution is transfered to new page and not control.
  • Occurs entirely on the server, no action is needed by the client
Sometimes for performance reasons, the server method is more desirable

 


2.68 How to get the hostname or IP address of the server?

 

You can use either of these:

  • HttpContext.Current.Server.MachineName
  • HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"]
The first one should return the name of the machine, the second returns the local ip address.
Note that name of the machine could be different than host, since your site could be using host headers

 


2.69 What is the meaning of validateRequest=true in .net framework1.1?

 

The value of validateRequest is set to 'true' by default, which means that the framework will automatically deny submission of the '<' and '>' characters.


2.70 What is the different between <%# %> and <%= %>?

 

The <%# %> is used for databinding where as <%= %> is used to output the result of an expression. The expression inside <%# %> will be executed only when you call the page's or control's DataBind method. The expression inside <%= %> will be executed and displayed as and when it appears in the page.


2.71 What permissions do ASP.NET applications posses by default?

 

By default ASP.NET Web applications run as ASP.NET user. This user has limited permissions equivalent to the User Group.


2.72 How can I specify the relative path for a file?

 

Suppose you have following file hierarchy:

 
default.aspx
Admin/login.aspx
Misc/testpage.aspx
 


And you are on the login.aspx and want your user to navigate to the default.aspx (or testpage.aspx) file. Then you can use

  • Response.Redirect ("../default.aspx")
  • Response.Redirect ("../Misc/testpage.aspx")

 


2.73 How can I specify the "upload a file" input textbox in a form to be read only so that the user can click on the browse button and pick a file but they cannot type anything into the textbox next to the browse button.

 

 

 
<input id="File1" type="file" contenteditable=false />
 
 

 


2.74 How to change the Page Title dynamically?

 

 

 
<TITLE id="Title1" runat =server ></TITLE>
 

VB.NET

 
'Declare
Protected WithEvents Title1 As System.Web.UI.HtmlControls.HtmlGenericControl
 
'In Page_Load
Title1.InnerText ="Page 1"
 

C#

 
//Declare
protected System.Web.UI.HtmlControls.HtmlGenericControl Title1 ;
 
//In Page_Load
Title1.InnerText ="Page 1" ;
 

 


2.75 Why do I get the error message "Object must implement IConvertible". How can I resolve it?

 

The common cause for this error is specifying a control as a SqlParameter's Value instead of the control's text value.
For example, if you write code as below you'll get the above error:

VB.NET

 
Dim nameParameter As SqlParameter = command.Parameters.Add("@name", SqlDbType.NVarChar, 50)
nameParameter.Value = txtName
 

C#

 
SqlParameter nameParameter = command.Parameters.Add("@name", SqlDbType.NVarChar, 50);
nameParameter.Value = txtName ;
 

To resolve it, specify the control's Text property instead of the control itself.

VB.NET

 
nameParameter.Value = txtName.Text
 

C#

 
nameParameter.Value =txtName.Text;
 

 


2.76 Why is default.aspx page not opened if i specify http://localhost. I am able to view this page if i hardcode it as http://localhost/default.aspx?

 

If some other default page comes higher in the list, adjust the default.aspx to be the number one entry inside the IIS configuration. If you have multiple websites inside IIS, make sure the configuration is applied on the right website (or on all websites by applying the configuration on the server-level using the properties dialog, configure WWW service).


2.77 Can ASP.NET work on an NT server?

 

No. For more details refer ASP 1.1 version


2.78 Is it possible to migrate Visual InterDev Design-Time Controls to ASP.NET?

 

Refer INFO: Migrating Visual InterDev Design-Time Controls to ASP.NET


2.79 How to automatically get the latest version of all the asp.net solution items from Source Safe when opening the solution?

 

In VS.NET you can go to Tools > Options > Source Control > General and check the checkbox for Get everything when a solution opens.
This retrieves the latest version of all solution items when you open the solution.


2.80 How to convert the datetime into a string for use in the SQL ' statement?

 

 

 
<asp:label id="Label2" runat="server">Select a culture: </asp:label>
<asp:dropdownlist id="ddlCulture" runat="server" autopostback="True"></asp:dropdownlist>
<P></P>
<asp:label id="Label3" runat="server">DateTime in Selected Culture</asp:label>
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
<p>
<asp:label id="Label1" runat="server"></asp:label>
 

VB.NET

 
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
 If Not Page.IsPostBack Then
 Dim cInfo As CultureInfo
 For Each cInfo In CultureInfo.GetCultures(CultureTypes.SpecificCultures)
 ddlCulture.Items.Add(cInfo.Name)
Next
 End If
End Sub
 
Private Sub ddlCulture_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlCulture.SelectedIndexChanged
' Get a CultureInfo object based on culture selection in dropdownlist
 Dim cInfo As CultureInfo = New CultureInfo(ddlCulture.SelectedItem.Text)
' Get a CultureInfo object based on Invariant culture
 Dim cInfoNeutral As CultureInfo = New CultureInfo("")
' Display the datetime based on the formatting of the selected culture
 TextBox1.Text = Convert.ToString(Now, cInfo.DateTimeFormat)
' Create a DateTime variable to hold the Invariant time
 Dim dt As DateTime
 dt = Convert.ToDateTime(TextBox1.Text, cInfo.DateTimeFormat)
'Convert the datetime into a string for use in the SQL statement
 Label1.Text = "... WHERE ([Date] < '" & _
 Convert.ToString(dt, cInfoNeutral.DateTimeFormat) & "')"
End Sub
 
 

C#

 
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
 if (!Page.IsPostBack )
{
 foreach(CultureInfo cInfo in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
{
 ddlCulture.Items.Add(cInfo.Name);
}
}
}
 
private void ddlCulture_SelectedIndexChanged(object sender, System.EventArgs e)
{
// Get a CultureInfo object based on culture selection in dropdownlist
CultureInfo cInfo = new CultureInfo(ddlCulture.SelectedItem.Text);
// Get a CultureInfo object based on Invariant culture
CultureInfo cInfoNeutral = new CultureInfo("");
// Display the datetime based on the formatting of the selected culture
TextBox1.Text = Convert.ToString(DateTime.Now , cInfo.DateTimeFormat);
// Create a DateTime variable to hold the Invariant time
DateTime dt ;
dt = Convert.ToDateTime(TextBox1.Text, cInfo.DateTimeFormat);
//Convert the datetime into a string for use in the SQL statement
Label1.Text = "... WHERE ([Date] < '" + Convert.ToString(dt, cInfoNeutral.DateTimeFormat) + "')";
}
 

 


2.81 How to make VS.Net use FlowLayout as the default layout rather than the GridLayout?

 

For VB.NET, go to path C:\Program Files\Microsoft Visual Studio .NET\Vb7\VBWizards\WebForm\Templates\1033
Change the following line in the existing WebForm1.aspx

 
<body MS_POSITIONING="[!output DEFAULT_HTML_LAYOUT]">
 

to

 
 
 

For C#, go to path C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards\CSharpWebAppWiz\Templates\1033
Change the following line in the existing WebForm1.aspx

 
<body MS_POSITIONING="[!output DEFAULT_HTML_LAYOUT]">
 

to

 
 
 

Note:Before changing any templates it's a good idea to make backup copies of them
Or rather than above approach you can change the behavior for new files on a per project basis in Visual Studio by:

  1. Right clicking on the project name (Ex: "WebApplication1)" in Solution Explorer, and select "Properties".
  2. From project properties window, under Common Properties>Designer Defaults>Page Layout change "Grid" to "Flow".

 


2.82 Can I use a DataReader to update/insert/delete a record?

 

No. DataReader provides a means of reading a forward-only stream of rows from a database.


2.83 What is the difference between Server.Transfer and Server.Execute?

 

 

  • Server.Transfer is used to End the current weform and begin executing a new webform. This method works only when navigating to a Web Forms page (.aspx)
  • Server.Execute is used to begin executing a new webform while still displaying the current web form. The contents of both forms are combined. This method works only when navigating to a webform page(.aspx)

 


2.84 How to create a login screen in ASP.NET?

 

Here is a sample login screen:

 

 
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1">
<TR>
<TD>
<asp:Label id="Label1" runat="server">User Name</asp:Label></TD>
<TD>
<asp:TextBox id="txtUserName" runat="server"></asp:TextBox></TD>
<TD>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtUserName"></asp:RequiredFieldValidator></TD>
</TR>
<TR>
<TD>
<asp:Label id="Label2" runat="server">Password</asp:Label></TD>
<TD>
<asp:TextBox id="txtPassword" runat="server"></asp:TextBox></TD>
<TD>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="txtPassword"></asp:RequiredFieldValidator></TD>
</TR>
<TR>
<TD></TD>
<TD>
<asp:Button id="btnLogin" runat="server" Text="Login"></asp:Button></TD>
<TD></TD>
</TR>
</TABLE>
 

VB.NET

 
Dim myconnection As SqlConnection
Dim mycmd As SqlCommand
Dim strSql As String
Dim myReader As SqlDataReader
 
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
myconnection = New SqlConnection("Server=localhost;uid=sa;password=;database=northwind;")
strSql = "Select * from usertbl where username=" & "'" & txtUserName.Text & "'" & " and userpassword=" & "'" & txtPassword.Text & "'"
mycmd = New SqlCommand(strSql, myconnection)
myconnection.Open()
myReader = mycmd.ExecuteReader(CommandBehavior.CloseConnection)
If myReader.Read() Then
Response.Write("Welcome")
Else
Response.Write("Access Denied")
End If
 
End Sub
 

C#

 
SqlConnection myconnection ;
SqlCommand mycmd ;
string strSql ;
SqlDataReader myReader ;
private void btnLogin_Click(object sender, System.EventArgs e)
{
 myconnection = new SqlConnection("Server=localhost;uid=sa;password=;database=northwind;");
 strSql = "Select * from usertbl where username=" + "'" + txtUserName.Text + "'" + " and userpassword=" + "'" + txtPassword.Text + "'";
 mycmd = new SqlCommand(strSql, myconnection);
 myconnection.Open();
 myReader = mycmd.ExecuteReader(CommandBehavior.CloseConnection);
 if (myReader.Read() )
{
 Response.Write("Welcome");
}
 else
{
 Response.Write("Access Denied");
}
}
 

 


2.85 How to format a Telphone number in the xxx-xxx-xxxx format?

 

VB.NET

 
Dim Telno As Double = Double.Parse(ds.Tables(0).Rows(0)("TelNo").ToString())
Response.Write(Telno.ToString("###-###-####"))
 

C#

 
double Telno= double.Parse(ds.Tables[0].Rows[0]["TelNo"].ToString());
Response.Write(Telno.ToString("###-###-####"));
 
 

 


2.86 Can two different programming languages be mixed in a single ASPX file?

 

No. ASP.NET uses parsers to strip the code from ASPX files and copy it to temporary files containing derived Page classes, and a given parser understands only one language


2.87 Can I use custom .NET data types in a Web form?

 

Yes. Place the DLL containing the type in the application root's bin directory and ASP.NET will automatically load the DLL when the type is referenced. This is also what happens when you add a custom control from the toolbox to your web form.


2.88 How can I have a particular Web page in an ASP.NET application which displays its own error page.

 

This can be done by setting the ErroPage attribute of Page Directive or ErrorPage property of Page Class to the desired Custom Error Page

 
<%@Page Language="C#" ErrorPage="specificerropage.htm"%>
 

In web.config

 
<customErrors mode="On" />
 

 

 

Bu makaleyi beğendin mi? Yorumunu Yaz!







Sizden Gelen Yorumlar:

Yorum Yazın




Copyright© 2001-2018. Bilgisayar Mühendisleri Portalı | Bütün hakları saklıdır.