Skip to main content

Posts

Showing posts from September, 2011

Download SCERTUP BTC 2011 Application Form

Note : Professional Courses Student can also now apply for UP BTC 2011 and date extended. The SCERT of UP was established at Lucknow in 1981 as an apex government organization at the state level. The State Council of Educational  Research  &  Training , U.P., is providing academic support to the District Primary Education Program intended primarily to accelerate the processes of pedagogical renewal in the state.   The Utter Pradesh Education Board Basic Training Certificate or B.T.C Application Form 2011 is now available for download on the Uttar Pradesh State Council of Educational Research & Training (SCERT) official website. Pre-Service Training * Training of Special B.T.C. Trainees. Training Urdu Special B.T.C. in process * Training of Shiksha Mitras, EGS/ AIE Instructors & Literacy functionaries. * Pre-service Training for physical Education and nursery training also being conducted. The thrust areas include  (a) deve...

Convert Image To Bytes in VB.Net

Sometimes we need to convert image to bytes to store image into SQL server database. First of all we have to imports some namespace in our class. Imports System.IO Imports System.IO.Stream here is vb code for that conversion. Public Function ConvertImageToByte( ByVal Img As Image) As Byte ()         Dim ms As MemoryStream = New MemoryStream()                 Img.Save(ms, Img.RawFormat)         Dim data(ms.Length) As Byte         ms.Position = 0         ms.Read(data, 0, ms.Length)         ms.Close()         ms = Nothing         ConvertImageToByte = data     End Function Happy Co...

DataView Rowfilter With Like % in C#.Net

DataView RowFilter Syntax in C#,ASP.Net Example This example describes syntax of DataView.RowFilter expression. It shows how to correctly build expression string (without "SQL injection" ) using methods to escape values. Column names If a column name contains any of these special characters ~ ( ) # \ / = > < + – * % & | ^ ' " [ ], you must enclose the column name within square brackets [ ]. If a column namecontains right bracket ] or backslash \, escape it with backslash (\] or \\). [C#] dataView.RowFilter = "id = 10″; // no special character in column name " id " dataView.RowFilter = "$id = 10″; // no special character in column name " $id " dataView.RowFilter = "[#id] = 10″; // special character " #" in column name "#id" dataView.RowFilter = "[[id\]] = 10″; // special characters in column name " [id] " Literals String values are enclosed within single qu...

CSS : Div Layer with scroll bars (Cascading Style Sheet)

Sometimes the list content is very long and we dont want a very huge page length. iframe dont seem to work because we need a src="", and  also use ajax on this page. All we need to do it put a div around the content. Set its dimensions and overflow:auto in its style: < div style ="width:300px;height:250px;overflow:auto;"> your content goes here </ div > if the content is too long,then there will be a vertical scrollbar. If the content is too wide and  cannot wrap within div witdh,then there will be a horizontal scrollbar.

ASP.Net : The test form is only available for methods with primitive types as parameters

I made a webservice but some methods cannot be tested, I get following message:   The test form is only available for methods with primitive types as parameters.    when click on the service it display this irritating message. I found that this could also be due to passing the variables in the Method definition as ref.  I removed in marked in red circle to solve the problem.  

SQL SERVER : Shrinking and Truncation of Log File ,Log Full

SQL Query for Srink and Trucation of Log File in Sql Server 2005. Here I want to describe some tricks to truncate log file for a database in SQL Server 2005. If primary transaction log file is exceed in large volume then is it good to restrict size , there is nothing wrong impact if we restrict the size. First get Logical name of Log file . 1. Open SQL Server Management Studio and connect to the Sql Server. 2. Right Click on Database Name.Click on Properties. 3. Copy the name in Red Circle this is the Log File name. And replace this log name into given query. 4. Result Set Here is the SQL Query to copy and execute with replacement with your requirement. Use AMS dbcc shrinkfile ( AIMS_LOG , 1 ) backup log AMS with truncate_only dbcc shrinkfile ( AIMS_LOG , 2 )

How to get DIV Layer to appear over flash Object in Website

Here we can add an attribure to our flash object or swf object, to show Div layer over Flash Object.  so.addParam("wmode", "transparent"); <script type="text/javascript">    var so = new SWFObject("movie.swf", "mymovie", "400", "100%", "8", "#336699");    so.addParam("quality", "low");     so.addParam("wmode", "transparent");    so.addParam("salign", "t");    so.write("flashcontent"); </script> or we can add "wmode=transparent"  In the “embed” area. <object classid="123" width="550" height="400" id="movie_name" align="middle">     <param name="movie" value=" dotnetcodebytes.blogspot.com.swf"/>     <!--[if !IE]>-->     <object type="application/x-shockwave-flash" data=" dotnetcodeby...

Vat Calculation Formula (India)

Vat Calculation in India (Vat Calculator) Amount Excluding Vat Tax = ( 100 * MRP ( With Vat ) ) / ( 100 + vat (%)) For Example MRP RATE = 104 that price has included vat 4%. Amount Excluding Vat Tax = ( 100 * 104) / ( 100 + 4 ) that will give Amount Excluding Vat Tax = 100 Rs. Vat Amount=MRP RATE – Amount Excluding Vat Tax Vat Amount= 104-100 Vat Amount =4 Rs.

VB.Net : Save Image to Sql Server Database in VB.Net

Store Image into SQL Database using VB.Net Here is the steps to save image into database.I'm using picture box to show saved image in database. Before all this create one database, and one table with the name  tbl_Employee  and the  following  feilds Field Name Data Type Empcode int Address Varchar(500) Password Varchar(50) Photo image Here is interface which is used in pick image from local system. Having picture box and two button Add Photo, Remove Photo . Here is code for Add Photo button. Private Sub cmdAddPhoto_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddPhoto.Click         If dlgOpen.ShowDialog() = Windows.Forms.DialogResult.OK Then             pic.Image = Image.FromFile(dlgOpen.FileName)      ...

SQL SERVER : Find all tables with a specific column name not present in Table

When we need those table which does not have specific column name in their table structure.   To retrieve information about column exits in table ,we specify the fully qualified name of INFORMATION_SCHEMA.columns   select distinct table_name From information_schema.columns except select distinct table_name From information_schema.columns where column_name like 'Your Column Name' You can also find all tables in a db that have a certain column name.   select distinct table_name From information_schema.columns where column_name like 'Your Column Name' * EXCEPT returns any distinct values from the left query that are not also found on the right query.   * Replace  'Your Column Name' with your search column name.