April 21, 2011 - 5:09 pm
Posted in ASP.NET | No comments
In this post, we want to show how button in user control communicate with web page in asp.net
First create user control called button.ascx.
Add 3 button, name it btnSave, btnEdit and btnCancel.
in button.ascx back code, add this code:
Public Partial Class button
Inherits System.Web.UI.UserControl
Public Event btnSaveHandler As System.EventHandler
[...]
February 4, 2010 - 11:26 am
Posted in VB.NET | 1 comment
One of the disadvantages when we using tableadapter to retrieve the data from database is they do not provide property to set command timeout (SHIT). This giving me a huge headache for my project which most of the entire project is using tableadapter instead of creating my own DAL or class.
After do some research on [...]
December 2, 2009 - 1:42 pm
Posted in VB.NET | No comments
For example I have string value like this:
<?xml version="1.0"?>
<Product type="Condom">
<CondomName>durex</CondomName>
[...]
December 2, 2009 - 1:12 pm
Posted in VB.NET | 1 comment
Normally when we add Javascript Alert to our asp.net it will be like this:
Page. ClientScript.RegisterStartupScript(this.GetType(), "winPop", "alert(’Update is successful’)
but this code is not working if you using the code inside update panel.
So in order to add javascript in update panel you need to register you client script to your script manager as shown below:
ScriptManager.RegisterClientScriptBlock(Page, [...]
July 17, 2009 - 6:29 am
Posted in VB.NET | 1 comment
In this post I will show you how to convert from .csv files to dataset in ASP.NET
Here is the function to convert CSV file to dataset in asp.net using vb.net.
First you need to upload the csv file into your web server, then save the file path.
Add this function code:
Private Shared Function [...]
June 10, 2009 - 7:20 am
Posted in VB.NET | No comments
This article demonstrates how to use ASP.NET and ADO.NET with Visual Basic .NET to create and to call a Microsoft SQL Server stored procedure with an input parameter and an output parameter.
1 step create store procedure
Create Procedure GetAuthorsByLastName1 (@au_lname varchar(40), @RowCount int output)
as
select * from authors where au_lname like @au_lname;
/* @@ROWCOUNT returns the number of [...]
June 6, 2009 - 6:28 pm
Posted in VB.NET | No comments
First of all, you need need to set something in your gmail account to enable sending email using asp.net
1. Open you gmail account and go to setting
2. Click on Forwarding and POP/IMAP
3. Choose Enable POP for mail that arrives from now on
4. Click save changes
Here is the code for sending email from asp.net by using [...]
June 4, 2009 - 1:07 am
Posted in VB.NET | No comments
In this article I will show how to read value from excel per cell,
First Im using FileUpload component from asp.net
<td>
<asp:FileUpload ID="uplFile" runat="server" Width="367px"/>
</td>
Don’t Forget to add triger to set autopostback, or else some people may counter error when [...]