Hi All,

I want to build an application that will navigate a website that contains user login form and automatically logged to it and retrieve data from it's table. Is this possible? What would be my best approach here.

Thanks in advance.


-renzlo

The point is in accessing a database. There is all stored (usernames, passowords,...).
So you need a connection string to the particulat databse (sql, mysql, oracle, ...) and then you have to know table names and columns inside of each. Then you can with some knowledge of sql query statements retreive data from it.

BUT: the database (serve) MUST ALLOW you to access to the it. Many of them do not.

The point is in accessing a database. There is all stored (usernames, passowords,...).
So you need a connection string to the particulat databse (sql, mysql, oracle, ...) and then you have to know table names and columns inside of each. Then you can with some knowledge of sql query statements retreive data from it.

BUT: the database (serve) MUST ALLOW you to access to the it. Many of them do not.

Hi Mitja,

Thanks for replying, Database will not be a problem for me. Any inputs?

Which inputs?
You need an appropriate connection string (depending on the database) and the appropriazes classes to access to the data in this database (Sql, Oledb classes).

with my question above, how can I do that?

"I want to build an application that will navigate a website that contains user login form and automatically logged to it and retrieve data from it's table. Is this possible? What would be my best approach here."

The image attached shows the table I want to get. and here's the source code of that page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title></title>
		<LINK href="./CSS Files/iSysStyleSheet.css" type="text/css" rel="stylesheet">
		<script>
 
	function OpenWindow(PageFilename)
	{
		window.open(PageFilename, 'CustomPopUp','width=600, height=285, menubar=no, resizable=yes');
	}
	function CloseWindow()
	{
		window.close(); 
	}
	function getMessage(strMessage,actionNum) 
    { 		          
	   //var ans; ans=window.confirm('Are you sure want to reset the password of the selected employee.?'); 		
       var ans;               
       
       ans=window.confirm(strMessage); 
       
        if(ans == true)
        {
            document.getElementById('Pager1$ctl00$txtValue').value = "True"; 
            if(actionNum == "2")
            {
				alert("Password has been reset.");
            }
            //alert(document.getElementById('Pager1$ctl00$txtValue').value);
            //alert("Action done");
        }        
        else
        {			
           document.getElementById('Pager1$ctl00$txtValue').value = "False";            
        }
     } 
     
    
    
    function getMessage1(strMessage,actionNum,page) 
    { 		          
	   //var ans; ans=window.confirm('Are you sure want to reset the password of the selected employee.?'); 		
       var ans;     
       
        if(page == "Employee Information")
		{					
			if(document.getElementById('Pager1$ctl00$tbBoolValueDelete').value == "False")			
			{
				alert("You are not allow to delete an employee");
				return;	
			}						
		}   	   
		
	    if(page == "Terminal Group")
		{					
			if(document.getElementById('Pager1$ctl00$tbBoolValueDelete').value == "False")			
			{
				alert("You are not allow to delete a group");
				return;	
			}				
		}   
		if(page == "Terminal Maintenance")
		{					
			if(document.getElementById('Pager1$ctl00$tbBoolValueDelete').value == "False")			
			{
				alert("You are not allow to delete a Terminal");
				return;	
			}				
		}   		   
                      
       ans=window.confirm(strMessage); 
       
        if(ans == true)
        {
            document.getElementById('Pager1$ctl00$txtValue').value = "True";  	            		 
        }        
        else
        {			
           document.getElementById('Pager1$ctl00$txtValue').value = "False";            
        }
     } 
     	
	 function UnlockTextBoxes(bool,button,page)
	 { 		 	
		if(page == "Employee Information")
		{
			if(button == "New")
			{			
				if(document.getElementById('Pager1$ctl00$tbBoolValueADD').value == "False")			
				{
					alert("You are not allow to add an employee");
					return;	
				}		
			}
			
			if(button == "Edit")
			{
				
			    if(document.getElementById('Pager1$ctl00$tbBoolValueEdit').value == "False")			
				{
					alert("You are not allow to edit an employee");
					return;	
				}			
			}
		}   	   	    	  	 		
		
		if(page == "Reference Maintenance")
		{
			if(button == "New")
			{			
				if(document.getElementById('Pager1$ctl00$tbBoolValueADD').value == "False")			
				{
					alert("You are not allow to add a group");
					return;	
				}		
			}
			
			if(button == "Edit")
			{
				
			    if(document.getElementById('Pager1$ctl00$tbBoolValueEdit').value == "False")			
				{
					alert("You are not allow to edit an group");
					return;	
				}			
			}		
		}	
		
		if(page == "Terminal Maintenance")
		{
			if(button == "New")
			{			
				if(document.getElementById('Pager1$ctl00$tbBoolValueADD').value == "False")			
				{
					alert("You are not allow to add a terminal");
					return;	
				}		
			}
			
			if(button == "Edit")
			{
				
			    if(document.getElementById('Pager1$ctl00$tbBoolValueEdit').value == "False")			
				{
					alert("You are not allow to edit a terminal");
					return;	
				}			
			}		
		}	
		
		if(page == "Export Setup")
		{
			if(button == "New")
			{			
				if(document.getElementById('Pager1$ctl00$tbBoolValueADD').value == "False")			
				{
					alert("You are not allow to make new export settings");
					return;	
				}		
			}
			
			if(button == "Edit")
			{
				
			    if(document.getElementById('Pager1$ctl00$tbBoolValueEdit').value == "False")			
				{
					alert("You are not allow to modify export settings");
					return;	
				}			
			}		
		}	
	     /* Pager1$ctl00$btnSave to  Pager1$ctl00$btnSave*/  
	     
	     if(button == "New")
	     {
			document.getElementById('Pager1$ctl00$btnSave').disabled = bool == false ? false:true;
			document.getElementById('Pager1$ctl00$btnNew').disabled = bool == false ? true:false;
			document.getElementById('Pager1$ctl00$btnEdit').disabled = bool == false ? true:false;
			document.getElementById('Pager1$ctl00$btnDelete').disabled = bool == false ? true:false;
		 }
		
		 if(button == "Edit")
	     {
			if(document.getElementById('Pager1$ctl00$tbBadgeNo').value == "")
			{
				alert("There's no data to be modify.");
			}
			else
			{
				document.getElementById('Pager1$ctl00$btnSave').disabled = bool == false ? false:true;
				document.getElementById('Pager1$ctl00$btnNew').disabled = bool == false ? true:false;
				document.getElementById('Pager1$ctl00$btnEdit').disabled = bool == false ? true:false;
				document.getElementById('Pager1$ctl00$btnDelete').disabled = bool == false ? true:false;
			}
	     }
	     
	     if(button == "Cancel")
	     {
				document.getElementById('Pager1$ctl00$btnSave').disabled = bool == false ? false:true;
				document.getElementById('Pager1$ctl00$btnNew').disabled = bool == false ? true:false;
				document.getElementById('Pager1$ctl00$btnEdit').disabled = bool == false ? true:false;
				document.getElementById('Pager1$ctl00$btnDelete').disabled = bool == false ? true:false;								
				
				document.getElementById('Pager1$ctl00$tbSaveErrMessage').visible = false;
				alert("TEST");
				/*document.getElementById('Pager1_ctl00_lblTest').visible = bool == false ? true:false;*/							
				
	     }	
		/* Employee Information  Text Boxes*/ 
		if(page == "Employee Information")
		{			
			document.getElementById('Pager1$ctl00$tbEmpName').disabled = bool;
			document.getElementById('Pager1$ctl00$tbEmpNo').disabled = bool;
			document.getElementById('Pager1$ctl00$tbBadgeNo').disabled = bool;					
			document.getElementById('Pager1$ctl00$cboTerminalGroup').disabled = bool;								
		}
		
		/* Reference Maintenance TextBoxes */
		if(page == "Reference Maintenance")
		{		
			document.getElementById('Pager1$ctl00$txtRefCode').disabled = bool;
			document.getElementById('Pager1$ctl00$txtRefDesc').disabled = bool;		
		}
		
		if(page == "Terminal Maintenance")
		{
			document.getElementById('Pager1$ctl00$tbName').disabled = bool;		
			document.getElementById('Pager1$ctl00$tbDeviceID').disabled = bool;			
		}	 			    	    
		
		if(page == "Export Setup")
		{	
				//tbName
				document.getElementById('Pager1$ctl00$tbName').disabled = bool;							
		}
		
		if(button == "New")
		{			
			/* Reference Maintenance TextBoxes */			
			if(page == "Employee Information")
			{
				
				document.getElementById('Pager1$ctl00$tbEmpName').value = ""; 		
				document.getElementById('Pager1$ctl00$tbEmpNo').value = ""; 		
				document.getElementById('Pager1$ctl00$tbBadgeNo').value = ""; 		
				document.getElementById('Pager1$ctl00$cboTerminalGroup').value = ""; 	
				
			}
			if(page == "Reference Maintenance")
			{		
				document.getElementById('Pager1$ctl00$txtRefCode').value = "";
				document.getElementById('Pager1$ctl00$txtRefDesc').value = "";
			}
			
			if(page == "Terminal Maintenance")
			{
				document.getElementById('Pager1$ctl00$tbName').value = "";		
				document.getElementById('Pager1$ctl00$tbDeviceID').value = "";			
			}	 
		
			if(page=="Export Setup")
			{
				document.getElementById('Pager1$ctl00$tbName').value = "";						
				ExportSetupNew();										
				document.clear(); 
							
			}			
			document.getElementById('Pager1$ctl00$txtValue').value = "New";		
		}
		else
		{	
							
				document.getElementById('Pager1$ctl00$txtValue').value = "Edit"; 
		} 	
		
		if(button == "Cancel")
		{	
			if(page=="Export Setup")
			{
				disabledControls();	   
			}
			
			if(page == "Employee Information")
			{
				document.getElementById('Pager1$ctl00$tbEmpName').value = ""; 		
				document.getElementById('Pager1$ctl00$tbEmpNo').value = ""; 		
				document.getElementById('Pager1$ctl00$tbBadgeNo').value = ""; 		
				document.getElementById('Pager1$ctl00$cboTerminalGroup').value = ""; 						
			}
		}
		
		if(button == "Edit")
		{
			if(page=="Export Setup")
			{
				EnableControlsForEdit();
			}
			if(page == "Employee Information")
			{
				
			}
		}				
	 }
		</script>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form name="Form1" method="post" action="Main.aspx?Page=Result" id="Form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUILTU5MDEwNDkPZBYCAgEPZBYMAgEPFgIeA3NyYwUOaW1hZ2UvbG9nby5qcGdkAgMPFgQeCWlubmVyaHRtbAUMUHVuY2ggVmlld2VyHgdWaXNpYmxlaGQCCQ8PFgIeBFRleHQFGFZlcnNpb24gOiAxLjAuMzU2MC4zMTM2N2RkAgsPDxYCHwNlZGQCDQ8PFgIfAwUnWW91IGFyZSBsb2dnZWQgaW4gYXMgR2xhZHlzIEMuIENhcmluZ2FsZGQCEQ9kFgJmD2QWBAIBDzwrAAsCAA8WDB4IUGFnZVNpemUCHh4IRGF0YUtleXMWAB4LXyFJdGVtQ291bnQCGB4JUGFnZUNvdW50AgEeFV8hRGF0YVNvdXJjZUl0ZW1Db3VudAIYHhBDdXJyZW50UGFnZUluZGV4ZmQKFCsACTwrAAQBABYIHgpIZWFkZXJUZXh0BQxCYWRnZSBOdW1iZXIeCURhdGFGaWVsZAUMQmFkZ2UgTnVtYmVyHg5Tb3J0RXhwcmVzc2lvbgUMQmFkZ2UgTnVtYmVyHghSZWFkT25seWg8KwAEAQAWCB8KBQ9FbXBsb3llZSBOdW1iZXIfCwUPRW1wbG95ZWUgTnVtYmVyHwwFD0VtcGxveWVlIE51bWJlch8NaDwrAAQBABYI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DBQRHWDE1ZGQCAg8PFgIfAwUSR2xhZHlzIEMuIENhcmluZ2FsZGQCAw8PFgIfAwUKMDMtMDYtMjAxMmRkAgQPDxYCHwMFBTA2OjE4ZGQCBQ8PFgIfAwUDT3V0ZGQCBg8PFgIfAwUKMDMtMDYtMjAxMmRkAgcPDxYCHwMFCDA2OjIwOjA0ZGQCCA8PFgIfAwUGTEFHLTA0ZGQCAg8PFgIfAwUSUmVjb3JkcyBGb3VuZCA6IDI0ZGRkFwgO1RfmdtJ70ab8HN39zbcxjrM=" />
</div>
 
<div>
 
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBALJ1/bvCAKiu/mrAQLlkcX6AQLlkbGfCeMGLIZ96Xoz4qRqYAMbF4zP67bp" />
</div>
			<center>
				<TABLE id="TABLE1" style="HEIGHT: 570px" height="30" cellSpacing="0" cellPadding="0" width="400"
					border="0" background="./image/SideMenu1.jpg">
					<TR>
						<td style="BACKGROUND-IMAGE: none; WIDTH: 185px; HEIGHT: 91px; BACKGROUND-COLOR: white"
							width="185" background="./image/SideMenuNew.JPG">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="image/logo.jpg" id="IMGLOGO" style="WIDTH: 128px; HEIGHT: 66px; BACKGROUND-COLOR: transparent" height="66" width="128" name="IMGLOGO" />
						</td>
						<td style="BACKGROUND-IMAGE: none; HEIGHT: 91px; BACKGROUND-COLOR: white" vAlign="middle"
							width="778" background="./image/SideMenuNew1.JPG" align="right">
							<DIV style="BACKGROUND-IMAGE: url(./image/SPI-Backgroud.JPG); WIDTH: 652px; POSITION: relative; HEIGHT: 88px"
								ms_positioning="GridLayout">&nbsp;
								
								<IMG id="IMG1" style="Z-INDEX: 102; LEFT: 128px; WIDTH: 88px; POSITION: absolute; TOP: 24px; HEIGHT: 48px"
									height="48" alt="" src="./image/Clock.gif" width="88">
								<span id="Label1" style="display:inline-block;color:Blue;background-color:Transparent;font-size:XX-Large;font-weight:bold;font-style:italic;width:136px;Z-INDEX: 103; LEFT: 192px; POSITION: absolute; TOP: 16px">PunchViewer</span>
								<span id="Label3" style="color:DimGray;font-size:XX-Large;font-weight:bold;Z-INDEX: 104; LEFT: 64px; POSITION: absolute; TOP: 16px">iSys</span>
								<span id="Label6" style="display:inline-block;color:#00C0C0;height:8px;width:309px;Z-INDEX: 105; LEFT: 336px; POSITION: absolute; TOP: 0px">Version : 1.0.3560.31367</span>
							</DIV>
							<span id="Label5" style="display:inline-block;color:Maroon;font-weight:bold;width:270px;"></span>
							<span id="Label4" style="display:inline-block;width:377px;">You are logged in as Gladys C. Caringal</span>
						</td>
					</TR>
					<tr>
						<td style="WIDTH: 185px; BACKGROUND-COLOR: #99cccc" background="./image/SideMenuNew.JPG">
							<table class="iSysMenu" id="TABLE2" height="80%" cellSpacing="0" cellPadding="0" width="200"
								align="left" border="0">
								<tr><td valign="top" bgcolor = "#99cccc"><A  href="./Main.aspx?Page=Search">Search Punch</A><A href="./Kronos FAQ.htm">FAQ</A><A>&nbsp;</A><A>&nbsp;</A><A href="./ChangePassword.aspx">Change Password</A><A href="./login.aspx">Logout</A><A><IMG  width='150' height='40' alt='' src='./image/pica.jpg'></A></table>
						</td>
						<td style="BACKGROUND-IMAGE: url(./image/SideMenuNew1.jpg); BACKGROUND-COLOR: #99cccc"
							background="./image/SideMenuNew1.JPG">
							<table class="iSysFonts" id="TABLE3" height="80%" cellSpacing="0" cellPadding="0" width="778"
								align="left" background="image/Body.jpg" border="0">
								<tr>
									<td style="BACKGROUND-IMAGE: url(./image/SideMenuNew1.JPG); BACKGROUND-COLOR: #99cccc"
										vAlign="top"><P>
<DIV style="POSITION: relative; WIDTH: 778px; HEIGHT: 547px" ms_positioning="GridLayout"><table cellspacing="0" cellpadding="0" align="Justify" rules="all" border="1" id="Pager1_ctl00_DataGrid1" style="font-family:Arial;font-size:XX-Small;height:256px;width:761px;border-collapse:collapse;Z-INDEX: 100; POSITION: absolute; TOP: 32px; LEFT: 8px">
	<tr style="color:Brown;background-color:Gainsboro;border-color:Brown;border-width:12px;border-style:Solid;font-family:Arial;height:10px;">
		<th scope="col">Badge Number</th><th scope="col">Employee Number</th><th scope="col">Employee Name</th><th scope="col">Punch Date</th><th scope="col">Punch Time</th><th scope="col">Punch Type</th><th scope="col">Date Collected</th><th scope="col">Time Collected</th><th scope="col">Terminal Name</th>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-21-2012</td><td>06:14</td><td>Out</td><td>02-21-2012</td><td>06:14:34</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-21-2012</td><td>21:36</td><td>In</td><td>02-21-2012</td><td>21:37:47</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-22-2012</td><td>06:17</td><td>Out</td><td>02-22-2012</td><td>06:17:52</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-22-2012</td><td>21:33</td><td>In</td><td>02-22-2012</td><td>21:33:30</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-23-2012</td><td>06:12</td><td>Out</td><td>02-23-2012</td><td>06:12:52</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-23-2012</td><td>21:39</td><td>In</td><td>02-23-2012</td><td>21:39:47</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-24-2012</td><td>06:13</td><td>Out</td><td>02-24-2012</td><td>06:15:39</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-24-2012</td><td>21:43</td><td>In</td><td>02-24-2012</td><td>21:44:21</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-25-2012</td><td>06:18</td><td>Out</td><td>02-25-2012</td><td>06:19:01</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-26-2012</td><td>06:00</td><td>In</td><td>02-26-2012</td><td>06:01:07</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-26-2012</td><td>14:22</td><td>Out</td><td>02-26-2012</td><td>14:22:57</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-27-2012</td><td>21:47</td><td>In</td><td>02-27-2012</td><td>21:47:31</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-28-2012</td><td>06:17</td><td>Out</td><td>02-28-2012</td><td>06:17:50</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-28-2012</td><td>21:39</td><td>In</td><td>02-28-2012</td><td>21:40:35</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-29-2012</td><td>06:23</td><td>Out</td><td>02-29-2012</td><td>06:23:44</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>02-29-2012</td><td>21:37</td><td>In</td><td>02-29-2012</td><td>21:37:12</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-01-2012</td><td>06:22</td><td>Out</td><td>03-01-2012</td><td>06:22:08</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-01-2012</td><td>21:44</td><td>In</td><td>03-01-2012</td><td>21:45:30</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-02-2012</td><td>07:02</td><td>Out</td><td>03-02-2012</td><td>07:03:06</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-02-2012</td><td>21:42</td><td>In</td><td>03-02-2012</td><td>21:43:56</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-03-2012</td><td>07:00</td><td>Out</td><td>03-03-2012</td><td>07:01:40</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-04-2012</td><td>14:00</td><td>In</td><td>03-04-2012</td><td>14:00:28</td><td>LAG-03</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-04-2012</td><td>22:00</td><td>Out</td><td>03-04-2012</td><td>22:01:48</td><td>LAG-04</td>
	</tr><tr style="color:RoyalBlue;background-color:WhiteSmoke;border-color:Transparent;border-width:12px;border-style:Solid;height:5%;">
		<td>028235</td><td>GX15</td><td>Gladys C. Caringal</td><td>03-06-2012</td><td>06:18</td><td>Out</td><td>03-06-2012</td><td>06:20:04</td><td>LAG-04</td>
	</tr><tr valign="middle" style="border-color:White;font-family:Arial;font-size:Small;">
		<td><span>1</span></td>
	</tr>
</table><span id="Pager1_ctl00_lblRecordFound" style="display:inline-block;font-family:Arial;width:177px;Z-INDEX: 102; POSITION: absolute; TOP: 8px; LEFT: 584px">Records Found : 24</span><span id="Pager1_ctl00_Label2" style="Z-INDEX: 103; POSITION: absolute; TOP: 8px; LEFT: 8px">Item per page</span><input name="Pager1$ctl00$TextBox1" type="text" value="30" id="Pager1_ctl00_TextBox1" style="width:64px;Z-INDEX: 104; POSITION: absolute; TOP: 8px; LEFT: 96px" /><input type="submit" name="Pager1$ctl00$Button2" value="Refresh" id="Pager1_ctl00_Button2" style="font-size:XX-Small;Z-INDEX: 105; POSITION: absolute; TOP: 8px; LEFT: 160px" /><input type="submit" name="Pager1$ctl00$Button3" value="Export to Excel" id="Pager1_ctl00_Button3" style="font-size:XX-Small;Z-INDEX: 106; POSITION: absolute; TOP: 8px; LEFT: 216px" /></DIV>
</P>
										<P>&nbsp;</P>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</TABLE>
			</center>
		</form>
	</body>
</HTML>

Edited 4 Years Ago by renzlo: n/a

Attachments table.jpg 47.65 KB

Sorry, was doing some other stuff.
Try like:

Dim table As New DataTable("dataFromWebsite2")
Dim conn As New SqlConnection("ConnString")
Dim query As String = "SELECT Column1, Column2 FROM MyTable"
'create your own query
Dim cmd As New SqlCommand(query, conn)
Dim da As New SqlDataAdapter(cmd)
da.Fill(table)
datagridview1.DataSource = table.DefaultView
cmd.Dispose()
conn.Dispose()
da.Dispose()

Hope it helps,
bye

This article has been dead for over six months. Start a new discussion instead.