Posted by: viralsarvaiya on: November 24, 2009
first of all create class file named ‘basepage.vb’ and add this code to class file
then after inherit this class file from page
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
Dim stringWriter As New System.IO.StringWriter
Dim htmlWriter As New HtmlTextWriter(stringWriter)
MyBase.Render(htmlWriter)
Dim html As String = stringWriter.ToString()
Dim StartPoint As Integer = html.IndexOf(“<input type=””hidden”” name=””__VIEWSTATE”””)
If StartPoint >= 0 Then
Dim EndPoint As Integer [...]
Posted by: viralsarvaiya on: November 21, 2009
Date and time format strings are used to specify which formatting to apply when a datetime data type is represented as a string.
Date and time format strings fall into either standard or custom format strings. Standard datetime format strings are those that the framework has predefined for commonly used datetime patterns, while custom datetime format [...]
Posted by: viralsarvaiya on: November 18, 2009
Windows Communication Foundation (WCF) is the latest service execution environment from Microsoft that enables you to seamlessly expose CLR types as services and consume services as CLR types. WCF is a unified programming model that combines the best of breed features from XML Web Services, .NET Remoting, MSMQ, and COM+ into an integrated platform that [...]
Posted by: viralsarvaiya on: November 10, 2009
To get HTML of web page you need only few lines of code.
To start, place two TextBox controls named txtURL and txtPageHTML, and one button control on web form, like in image bellow:
Now, on button’s click event function, place this code:
[ C# ]
// We need these namespaces
using System;
using System.Text;
using System.Net;
public partial [...]
Posted by: viralsarvaiya on: November 4, 2009
select * from information_schema.constraint_column_usage
This Query give the list of the table with the constraint
select * from information_schema.referential_constraints
this query give the list of the table with the foreign key constraint
now the query to find the relations
select
tblAll.table_name as Primary_TableName,
tblAll.column_name as Primary_TableColumn,
tblFK.table_name as ForeignKey_TableName,
tblFK.column_name as ForeignKey_ColumnName
from information_schema.constraint_column_usage tblAll
inner join information_schema.referential_constraints tblAllFK on
tblAllFK.unique_constraint_name = tblAll.constraint_name
inner join information_schema.constraint_column_usage tblFK on
tblAllFK.constraint_name=tblFK.constraint_name
Enjoy [...]
Posted by: viralsarvaiya on: November 4, 2009
I had been searching for a way to merge cells in a GridView
If e.Row.DataItemIndex % 2 = 0 Then
e.Row.Cells(0).RowSpan = 2
e.Row.Cells(1).RowSpan = 2
End If
‘Remove the extra cells created due to row span for odd rows
If e.Row.DataItemIndex % 2 = 1 Then
e.Row.Cells.RemoveAt(0)
e.Row.Cells.RemoveAt(0)
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
End If
This code should take every cell in the first and second columns [...]
Posted by: viralsarvaiya on: November 2, 2009
All the hype that once surrounded XML is finally starting to die down, and developers are really beginning to harness the power and flexibility of the language. XML is a data descriptive language that uses a set of user-defined tags to describe data in a hierarchically-structured format.
The release of Microsoft SQL Server 2000 a couple [...]
Recent Comments