Get Mac Address in ASP.Net

by kad1r 9. February 2010 10:18

This is really useful snipet for getting Mac address.

public string myMacAddress()
{
    ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
    ManagementObjectCollection moc = mc.GetInstances();
    string myMac = String.Empty;
    foreach (ManagementObject mo in moc)
    {
        if (myMac == String.Empty)
        {
            if ((bool)mo["IPEnabled"] == true)
                myMac = mo["myMac"].ToString();
        }
        mo.Dispose();
     }
     myMac = myMac.Replace(":", "");
     return myMac;
}

Silent Install .Net Framework

by kad1r 4. February 2010 18:24

Here is the little code for install .Net Framework silently. The user can't see the install window.

start /wait dotnetfx.path /q:a /c:"install.exe /q"

Response redirect after 5 sec

by kad1r 4. February 2010 16:58

If you want to redirect your page after some seconds you need to write downside code between head tags.

<meta http-equiv="refresh" content="5;url=/default.aspx" />

Tags: , ,

Code Snippets

Free .Net components

by kad1r 3. February 2010 21:38

Tags: , , ,

.Net

Technorati

by kad1r 3. February 2010 09:56
#1 Make a new post
#2 Paste your claim token on the post content
#3 Publish post
#4 Go to your Technorati account and click on “Check Claim”


Here is my Technorati claim code: 5ZXAYUBKDV2D
Come and get me :P

Tags: ,

Live

ASP.Net vs PHP and others

by kad1r 31. January 2010 23:26
Everytime I tell ASP.Net is very powerful and fast. Yes ofcourse PHP is also fast but not powerful like ASP.Net. PHP has a very big documentation and it has too many users.
Here is the ASP.Net and PHP comparison.
 

So, ASP.Net is faster than PHP ;)

Tags: , ,

ASP.Net | Live

AppDev Microsoft SQL Server 2008 For Developers

by kad1r 31. January 2010 22:51
Here is another good video tutorials for SQL Server 2008. It's very useful.
http://rapidshare.com/files/328643430/AppSQL.rar.001 
http://rapidshare.com/files/328643304/AppSQL.rar.002 
http://rapidshare.com/files/328643329/AppSQL.rar.003 
http://rapidshare.com/files/328644412/AppSQL.rar.004 
http://rapidshare.com/files/328644237/AppSQL.rar.005 
http://rapidshare.com/files/328645206/AppSQL.rar.006 
http://rapidshare.com/files/328643445/AppSQL.rar.007 
http://rapidshare.com/files/328643170/AppSQL.rar.008 
http://rapidshare.com/files/328644814/AppSQL.rar.009 
http://rapidshare.com/files/328643026/AppSQL.rar.010 
http://rapidshare.com/files/328644708/AppSQL.rar.011 
http://rapidshare.com/files/328643269/AppSQL.rar.012

Csharp video tutorials

by kad1r 31. January 2010 22:18
It's a big collection of C# videos. Here is the content:
Part 1:
01 - Getting Started with CS 2005 Express Edition
02 - Creating a Windows Application User Interface
03 - Writing Code to Handle Events and Set Properties
04 - Working with Variables, Expressions, Statements and Operators in CSharp
05 - Using Iteration and Selection Statements in CSharp
06 - Object Oriented Programming Fundamentals with CSharp - Part 1
06 - Object Oriented Programming Fundamentals with CSharp - Part 2
07 - Getting to Know the DotNet Framework
08 - Obtaining Data from a SQL Server 2005 Express Edition Database
09 - Databinding Data to User Interface Controls
10 - Working with XML
11 - Handling Exceptions
12 - The RSS Reader Project - Designing and Planning
13 - The RSS Reader Project - Building the UI
14 - The RSS Reader Project - Working with XML and SQL Server 2005 Express Edition Data
15 - The RSS Reader Project - Expanding and Refining Application Functionality
16 - The RSS Reader Project - Fortifying, Testing and Deploying the
 
Part 2:
How to Add Audio - Part 1 (CS)
How to Add Audio - Part 2 (CS)
How to call other applications using the Process control (CS)
How to create a System Tray application using the NotifyIcon control (CS)
How to use the BackgroundWorker Control (CS)
How to use the Dialog Controls (CS)
How to use the FlowLayout Panel (CS)
How to use the ListView Control Part 1 - Basics (CS)
How to use the ListView Control Part 2 - Advanced (CS)
How to use the MenuStrip Control (CS)
How to use the PictureBox Control (CS)
How to use the RichTextBox Control (CS)
How to use the SplitContainer control (CS)
How to use the StatusStrip Control (CS)
How to use the Tab Control (CS)
How to use the TableLayout control (CS)
How to use the Timer control (CS)
How to use the ToolStrip Control (CS)
How to use the TreeView Control (CS)
How to use the WebBrowser Control (CS)

Download From Hotfile.Com
http://hotfile.com/dl/26090268/e7467a7/10012703.CSCI.part1.rar 
http://hotfile.com/dl/26090335/1585248/10012703.CSCI.part2.rar 


Download From Rapidshare.Com
http://rapidshare.com/files/342262127/10012703.CSCI.part1.rar 
http://rapidshare.com/files/342262043/10012703.CSCI.part2.rar 

SQL Server Error 942.

by kad1r 30. January 2010 09:58
My database take offline itself and I can't change its situation. I restart sql server and sql service but still not working. Then I found a easy and short way. Write this code for take it online. After it goes online immediately take a backup ;)

sp_dboption 'your_db_name','offline','false'

False means it's online, true means it's offline.

Tags: ,

SQL

Close password ask window when using windows partition in Ubuntu

by kad1r 26. January 2010 16:36
Write to the terminal
sudo nano /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy
or press Alt + F2 key combinations and paste this
gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy
Then, find this line
auth_admin_keep
and replace with
yes
Now it's ok. Enjoy.

Tags: ,

Linux | Ubuntu

Google Chrome 4 Released

by kad1r 26. January 2010 01:21

Google Chrome 4 has been released. Upgrade immediately. It's very fast and the plugins are nice. But Firebug doesn't work for me. I don't know why but many people has that problem. The tabs are very fast. Enjoy.

Tags: , ,

Live

Firefox 3.6 Released

by kad1r 22. January 2010 13:29

Firefox 3.6 has been released. I upgrade my Firefox and it's amazing. I love the themes. Here is the themes. Some of the plugins are not compatible for 3.6 version. But it's early to say that. Enjoy.

Firefox 3.6 Release notes.

Firefox-kad1r

Tags: , , ,

Live | Released

Auto refresh your page

by kad1r 21. January 2010 18:07

This code refresh your webpage every 60 sec.

<meta http-equiv="refresh" content="10" />

 

PNG transparent fix in Internet Explorer

by kad1r 19. January 2010 14:05

If you have an image which has transparent IE 6.0 and early users see with the white background color. IF you want to fix it here is the JavaScript code.

 

 

for(var i=0; i<document.images.length; i++){
var img = document.images[i]
var imgName = img.src.toUpperCase()
if(imgName.substring(imgName.length-3, imgName.length) == "PNG"){
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}

 

LINQ for C# (e-book)

by kad1r 18. January 2010 14:36

http://socifiles.com/d/467871

  • Filename: LINQ-for-Visual-C-Sharp-2008---Apress.pdf
  • Size: 2.70 MB
  • Description: Every C# programmer needs to learn about LINQ (Language–lIntegrated Query), Microsoft’s breakthrough technology for simplifying and unifying data access from any data source. With LINQ you can write more elegant and flexible code not just to access databases and files but to manipulate data structures and XML. This book is a short yet comprehensive guide to the major features of LINQ and the significant enhancements introduced with .NET 3.5. There is no better source for getting a head–start on the future of these technologies than this book.

Tags: , , , ,

C#



Powered by BlogEngine.NET 1.5.0.7
Keywords: ASP.Net, C#, Javascript, snippets, programming, development, web development
VisualStudio.Gen.Tr

kad1r weblog

Hello. I'm a software/web developer. I'm 27 and software development manager at a software company. I love ASP.Net and C# ;) I'm interested with programming and security. 

Kadir Avci

Kartınızı Oluşturun

Widgets

ÇözümPark
cigicigi online
BlogEngineTR
See blogs and businesses for Canada