Geeks With Blogs
Nouman Zakir while (true) { Post.NewArticle(); }
Read only controls are not posted back to the server. So, when you do a postback you will lose the value in a read only control. You will need to not make the control read only. Instead, you can set the ReadOnly=False on your textbox and use the following code to solve the problem. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: TextBox1.Attributes.Add("re... ......

A C# class that makes it easier to download images from the web. Use the following code in your program to download image files such as JPG, GIF, PNG, etc from the internet using WebClient class. using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Net; public class DownloadImage { private string imageUrl; ......

Facebook was awarded a major patent for “Dynamically providing a news feed about a user of a social network”. This is a huge deal for a number of reasons, most significantly that it grants Facebook the opportunity to pursue other social networks which are infringing on their patent. Included in the patent are additional claims including feed filters, ......

The following are a number of transcribed conversations to technical support departments: -- Tech support: What kind of computer do you have? Christine says: A white one... =============== Customer: Hi, this is Maureen. I can't get my diskette out. Tech support: Have you tried pushing the Button? Customer: Yes, sure, it's really stuck. Tech support: ......

You can use SELECT statement to update records through UPDATE statement. In the SET Clause use the SELECT statement along with desired filters to update the records. UPDATE tblDestination SET tblDestination.col=value WHERE EXISTS ( SELECT col2.value FROM tblSource WHERE tblSource.join_col=tblDesti... AND tblSource.constraint=value) ......

In INSERT statement, by replacing the VALUES clause with a SELECT statement you can get a set of records for INSERT. Suppose I have a table called table_A and I want to populate it with the ID, Name and Address of table_B. The statement would look something like this: INSERT table_A (col_id, col_name, col_address) SELECT col_id, col_name, col_address ......

You can add optional parameters in stored procedures by setting a default value for each parameter that you want to make optional. The default value is typically NULL, but it's not necessary. Example: CREATE PROCEDURE dbo.mySP @firstParam VARCHAR(32) = NULL, @secondParam INT = NULL AS BEGIN SET NOCOUNT ON SELECT * FROM [TableName] WHERE Param1 = @firstParam ......

HAS_DBACCESS returns information about whether the user has access to the specified database. Example: SELECT HAS_DBACCESS('Northwind'); returns 1 if the user has access to the database 0 if the user does not have access to the database NULL if the database does not exist Find all databases that the current user has access to SELECT [Name] as DatabaseName ......

I got this joke in an email from my friend and I couldn't stop laughing. A plain computer illiterate guy rings tech support to report that his computer is faulty. Tech: What's the problem? User: There is smoke coming out of the power supply. Tech: You'll need a new power supply. User: No, I don't! I just need to change the start up files. Tech: Sir, ......

You may use DBCC CHECKIDENT to reseed (reset) the identity column of any table in SQL Server. Example: A table has 10 rows with 10 as last identity. The next record will automatically genrate 11, to start the new identity use the follwing T SQL query in query analyzer. DBCC CHECKIDENT (tableName, reseed, 15) To set the seed to zero use the following ......

Different Run Commands useful for time saving while using your computer. To invoke the Run box, hold down the Windows key and hit R (or from the Start Menu, choose "Run.") From there type any one of the keywords listed to launch an app: like calc for Calculator or clpbrd for the Clipboard Viewer or freecell for the card game. Program Run Command Accessibility ......

Method to retrieve every text inside the stored procedures of a database SELECT B.Name, * FROM syscomments A INNER JOIN sysobjects B ON A.id = B.id WHERE A.text like '%tblNames%' ......

You can launch the default browser to display HTML content using the Process.Start method in the System.Diagnostics namespace by specifying the URL as the argument. But I don't recommend this approach because sometimes the browser will launch behind your application. A more reliable option is to use the Help.ShowHelp method to launch HTML content (even ......

It's very important to log any uncaught exceptions that your ASP.NET application generates. Otherwise you may not be aware of serious problems with your website. You can trap exceptions by writing an Application_Error method in Global.asax. Call Server.GetLastError() to get the exception.I recommend logging the following data so that you'll be able ......

Environment.TickCount returns a 32-bit signed integer containing the amount of time in milliseconds that has passed since the last time the computer was started. But this value can overflow for systems that stay up for days at a time. To avoid this overflow problem, you can query the "System Up Time" performance counter: public TimeSpan SystemUpTime() ......

Copyright © Nouman Zakir | Powered by: GeeksWithBlogs.net | Join free