Skip to main content

Posts

Showing posts from July, 2010

How to fill grid in asp.net through code in function of class

How to fill grid in asp.net through code in function of class Public Function FillGrid() As DataTable Dim cmd As SqlCommand cmd = New SqlCommand("SP_SELECT_COLUMNNAMES", objCn.openDb()) cmd.CommandType = CommandType.StoredProcedure Dim dt As New DataTable("Dt") Dim da As New SqlDataAdapter(cmd) Try cmd.Parameters.Add(New SqlParameter("@COLUMNNAME", SqlDbType.VarChar, 1000, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _ColumnName)) cmd.Parameters.Add(New SqlParameter("@TABLE", SqlDbType.Char, 300, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _Table)) cmd.Parameters.Add(New SqlParameter("@CRITERIA", SqlDbType.Char, 2000, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, _Criteria)) 'Execute Query da.Fill(dt) 'da.Fill(dt) Dim Inti As Integer 'For Inti = 0 To dt.Columns.Count - 1 ' '

How to get financial year using asp.net code in class

How to get financial year using asp.net code in class Public Function GetFinYear(ByVal Dt1 As String) As String Dim mm, yy As String Dim int_mm, int_yy As Integer Dim dt As String dt = Dt1 ''.ToString("dd/MM/yyyy") Dim frm_dt, to_dt, fin_yr As String mm = dt.Substring(3, 2) yy = dt.Substring(6, 4) int_mm = CType(mm, Integer) int_yy = CType(yy, Integer) If int_mm <= 3 Then to_dt = "31/03/" & yy int_yy = int_yy - 1 frm_dt = "01/04/" & int_yy.ToString() Else frm_dt = "01/04/" & yy int_yy = int_yy + 1 to_dt = "31/03/" & int_yy.ToString() End If fin_yr = frm_dt.Substring(8, 2) + to_dt.Substring(8, 2) Return fin_yr End Function

function to Get scalar value and Get value of table using query using asp.net code

function to Get scalar value using asp.net code Public Function getSclarValue(ByVal Qry As String) As String Dim cmdDatabase As New SqlCommand Try cmdDatabase = New SqlCommand(Qry, objCn.openDb()) Return cmdDatabase.ExecuteScalar() Catch ex As Exception MsgBox(ex.Message) Return Nothing Finally objCn.closeDb() End Try End Function Function to Get value of table using query in asp.net Public Function GetTable(ByVal str As String) As DataTable Try Dim dt As New DataTable Dim cmd As New SqlCommand(str, objCn.openDb()) Dim adp As New SqlDataAdapter(cmd) adp.Fill(dt) Return dt Catch ex As Exception MsgBox("Error" + ex.Message) Return Nothing Finally objCn.closeDb() End Try End Function

FREE Download eBook for Computer IT

FREE Download eBook for Computer IT, Programming Languages, Java, C C++ C#, .Net, PHP Perl, Database SQL, VB, Oracle, AJAX, XML, eBooks Tutorial, Web Development Download Free for PDF|CHM files.

Pinging a Web service in .net

Pinging a Web service in .net IPAddress ip = IPAddress.Parse(txtPingEnter.Text); Ping p = new Ping(); PingReply pr = p.Send(ip); //txtPingResult.Text = pr.ToString(); txtPingResult.Text += pr.Status.ToString(); txtPingResult.Text += pr.RoundtripTime.ToString(); This is for pinging to an IP address .So my doubt is that how can we ping a web service like this ? As far as I know, we can ping against only an IP Address, not with URL. so what we can do is just make use of HttpWebrequest class to achieve the same. the below console program is used to sniff the site. using System.Net; using System; public class Sniffer { public static void Main() { try { string lcUrl = "URL "; // *** Establish the request HttpWebRequest loHttp = (HttpWebRequest) WebRequest.Create(lcUrl); // *** Set properties loHttp.Timeout = 10000; // 10 secs // pass Proxy string and bypass local machine if required. WebProxy loProxy = new WebProx

Cisco exam objective Question and Answer on Networking

LAN SWITCHING Missed Questions Report What Layer 3 function on a switch allows you to control broadcast messages? A. transparent bridging B. segmentation C. reduction of collision domains D. translational bridging E. VLANs You answered: The correct answer is: E This question pertains to Cisco's exam objective, 'LAN Switching' and its related sub-objective, '59) Describe the benefits of virtual LANs'. Which type of Ethernet operation loops back the sent frame? A. CSMA/CD B. Coaxial C. Full-Duplex D. Half-Duplex E. Fast Ethernet You answered: The correct answer is: D This question pertains to Cisco's exam objective, 'LAN Switching' and its related sub-objective, '51) Describe full- and half-duplex Ethernet operation'. What is the function of a MAC address? A. to provide NICs with connectivity B. to identify all devices at the Network layer C. to identify each device or interface at th

Books for IPR,Intellectual property rights

Some books for IPR P. Narayanan - Patent law (alongwith supplement) C.S. Lal - Intellectual property handbook :copyright, designs, patents & trademarks N.K. Acharya - Textbook on intellectual property rights Prabuddha Ganguli - Intellectual property rights : unleashing the knowledge economy Cornish, W.R. (ed.) - Cases and materials on intellectual property Cornish, W.R. - Intellectual property : patents, copyright, trade marks and allied rights GENETIC PATENT LAW AND STRATEGY by By Dr. Kalyan C Kankanala (Brain League, CKO and Co-founder) Price: Rs. 595 Publisher : manupatra ISBN : 978-81-89542-26-9 Edition : First Edition Language : English Table of Content http://www.manulawbooks.in/PubBookStore/Master/UploadFiles/TOCpic66.pdf Bks on Patent in IP bookshelf in DeePLegaL Library 1. Filing Patents Online: A Professional Guide by Sarfaraz K. Niazi CRC | ISBN: 0849316243 | 2003-04-28 | 464 pages 2. Patent It Yourself by Patent Attorney David Pressman Nolo P

Database Protection in India

The present legal environment in India grants protection to databases under the Copyright Act 1957. The judiciary has interpreted this protection utilizing the ‘sweat of the brow’ theory as applied in Feist Publications, Inc. v Rural Telephone Service Co. Enlarging the area of protection, Mr. Praveen Dalal (commentator on Cyber-law India) argues about protection available for databases in India as follows : (1) Article 300A of the Constitution of India, i.e. right to property that is a "Constitutional right", [point to consider - scholars around the world still debate whether copyrights and other IPRs are necessarily full fledged "property". ] (2) Under the provisions of the Copyright Act, 1957 r/w Article 10 (2) of the TRIPS Agreement, and (3) Under the IT Act, 2000. In the first case the US supreme court in 1991 had stressed on the arrangement of the actual compilation in a database which can be copyrighted also is know as the originality test and not