Tampilkan postingan dengan label Programming. Tampilkan semua postingan
Tampilkan postingan dengan label Programming. Tampilkan semua postingan

Selasa, 04 Januari 2011

Tools to make complex website ASP

First we need :
- visual studio .net 2005 or higher 2010
- install ajax 2.0 or higher for update panel and ajax other
- install component support asp.net maybe like most popular is devexpress, infragistic, component one
- Javascript need is : jquery or make a class js with your customize person
- make autocomplete.asmx for better faster searching
Thats all.. You done, happy debugger
ASP.Net is complex but run slowly if bandwidth small. So don't to many image if not important..

Minggu, 02 Januari 2011

Tab panel infragistic is error

I work project with asp.net. I choose infragistic components. But i get a error with infragistic. That error is tab panel infragistic. Is not compatible if i install in iis and maybe 1-2 hours is getting error. Yes this is because infragistic component tab panel. The another page without that tab panel was so smooth very well. Not error.
Check in the forun infragistic. Yes the tab panel infragistic error!! Doesnt have solution so maybe i can change tab panel

Jumat, 17 September 2010

solution Oledb .Net tidak support di 64 bit

.NET untuk koneksi ke oracle, biasanya menggunakan OLEDb
tapi jika server menggunakan 64bit, bukan 32 bit. Oledb tidak support.
Dalam hal ini penyelesainnya, menggunakan Oracle Data Provider atau disebut dengan ODP.Net. Bisa lihat disini
http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

Kamis, 24 Juni 2010

How to show your messagebox inside update panel on asp.net

Here type this code for your messagebox on asp.net :

Dim strScript As String = ""
ScriptManager.RegisterClientScriptBlock(Me, GetType(Page), "alert", strScript, False)

Now i have solution about modalpopup filter and click gridview on ASP.NET

just simple. on page_load
add :
if not page.ispostback then
tampilgv()
End If

And for button click, grdiview changing just add Modalpopupextender.show
but if selectend indexchanged for gridview just add Modalpopupextender.hide

Now I feel enjoy :)

Senin, 21 Juni 2010

I have trouble on Gridview pageindexchanging and select with update panel

When i create modal popup. Inside modalpopup, i have update panel and gridview. Inside update panel have gridview. When i need pageindexchanging, it works. but when select can't entry field on textbox.
Because i want, select gridview is event postbcak, and pageindexchanging evet asyncpostback. Ohh I don;t have answer to do this

Kamis, 17 Juni 2010

Why updatepanel on asp.net error

If error, you must do inside update panel have

and when i error the message is "An extender can't be in a different UpdatePanel than the control it extends. "
when inside update panel on button use for modal popup it was error. I don't know why. And i just search on google for solution. Ohh i don't know what to do.

Selasa, 15 Juni 2010

Time Delay for file SRT (Movie Subtitle)

When i download srt on subscene.com
it was not sync
have a delay for 4 second or more
So i found this solution on http://bejitalun.wordpress.com/
he was create the program for time delay solution.
It was indonesia program, but you will can use that

here please download this link
http://www.4shared.com/file/161371530/268ee93/srt_time_delay.html

For any trouble, please comment or go to chat in this blog.
Enjoy it

Senin, 14 Juni 2010

How to export and import oracle on CMD

How to export and import oracle

go to cmd
type
C:\>exp >> for export
and please type username example :
haikal@ORCL
*****
enter
export file is > yourname.dmp
so your exp will on C:\>
enter all
until user to be exported > type your username
done


type imp >> for import
and please type username example :
haikal@ORCL
*****
enter until
choose destination test.dmp(where your export dmp)
and type username for your dmp/dump
enter and finally done

Problem finding a control within a FormView from code-behind

Dim tedrega As TextBox
tedrega = FormView1.FindControl("edRegA")

Dim vr_noreg_abaru As String = ""
vr_noreg_abaru = tedrega.Text

Make Enter key work as tab, not postback

Change : .b.o.d.y. >> body

Didalam asp.net :
<.b.o.d.y. onkeydown="javascript:if(window.event.keyCode == 13 && window.event.srcElement.id != 'Button2') window.event.keyCode = 9;">

untuk textbox changed berjalan :
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Label1.Text = "Nama : " & TextBox1.Text & vbCrLf & "Alamat : " & TextBox2.Text _
& vbCrLf & "Telepon : " & TextBox3.Text
clears()

End Sub
---------
button ditambah propertiesnya UseSubmit behavior, agar enter tidak langusng ke Button postback

Connection, command insert update delete .NET

Example Code ASP.NET

Imports System.Data.OleDb
Public Class Class1
Public Shared con As New OleDbConnection(ConfigurationSettings.AppSettings("CONN2"))
Public Shared com As New OleDbCommand
Public Shared newval, tgToSQL As String
Public Shared appStrConn, appUserName, appPassword As String
Public Shared dbConnection As OleDbConnection
Public Shared dbCommand As OleDbCommand
Public Shared dr As OleDbDataReader
Public Shared status As Integer
Public Shared temp As String
Public Shared strConn As String
Public Shared pnlDefaultMenu As Panel
Public Shared bbndata As String

Public Shared Sub cekKoneksi()
If con.State = Data.ConnectionState.Open Then
con.Close()
End If
End Sub
End Class


Imports System.Data.OleDB
Imports Class1

Sub tampilgridview1()
Dim tabel As New DataTable
com.CommandText = "SELECT nofaktur, nama, alamat, kddealer, namadealer FROM lookup_register WHERE (tgregbpkb IS NULL) ORDER BY nofaktur"
cekKoneksi2()
con.Open()
com.Connection = con
dr = com.ExecuteReader
If dr.HasRows = True Then
tabel.Load(dr)
GridView1.DataSource = tabel
GridView1.DataBind()
End If
con.Close()
End Sub

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
displaydata()

End Sub

Protected Sub GridView2_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView2.PageIndexChanging
Response.Write("
NewpageIndex: " & e.NewPageIndex)
GridView2.PageIndex = e.NewPageIndex
tampilgridview2()

End Sub

Public Sub ClearTextBox(ByVal root As Control)
For Each ctrl As Control In root.Controls
ClearTextBox(ctrl)
If TypeOf ctrl Is TextBox Then
CType(ctrl, TextBox).Text = String.Empty
End If
Next ctrl
End Sub

Protected Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button9.Click
ClearTextBox(Me)
End Sub

Protected Sub Button11_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button11.Click
Dim tabel As New DataTable
Dim tes As String
tes = "SELECT .. WHERE " & DropDownList2.SelectedItem.Value & " LIKE '%" & txtcaridatabpkb.Text & "%'"
com.CommandText = tes
cekKoneksi2()
con.Open()
com.Connection = con
dr = com.ExecuteReader
If dr.HasRows = True Then
tabel.Load(dr)
GridView2.DataSource = tabel
GridView2.DataBind()
End If
con.Close()
End Sub

---------------------
Dim tes As String
cekKoneksi2()
con.Open()
tes = "INSERT INTO BPKB_MASTER(NOREG_A,NOREG_B,NOREG_C," & _
"NOREG_D,NM_DITLANTAS,TGREGISTER,NOBPKBA,NOBPKB,NOBPKBC," & _
VALUES ('" & edRegA.Text & "','" & edRegB.Text & "'" & _
",'" & edRegC.Text & "','" & edRegD.Text &
com.CommandText = tes
com.Connection = con
com.ExecuteNonQuery()
con.Close()

-------
If Trim(TextBox2.Text) = "" Or Trim(ComboBox1.SelectedValue) = "" Then
MsgBox("Inputan tidak boleh kosong")
Else
cekKoneksi()
con.Open()
com.CommandText = "update Kamar set ID_Paket_Kelas = '" & ComboBox1.SelectedValue & "', Lokasi = '" & TextBox2.Text & "', Status = '" & ComboBox2.SelectedValue & "' where No_Kamar = '" & TextBox1.Text & "'"
com.Connection = con
com.ExecuteNonQuery()
con.Close()
hapus()
MsgBox("Data telah diubah")
--------

Show messagebox in asp.net working on publish

if we use msgbox("alow")

in localhost we can show that, but if we have publish our web asp.net, will not working,

so i use javascript in asp.net

this is example my code :

Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Button1.Attributes.Add("onclick", "alert('Halo kal')")
Dim strMessage As String
strMessage = "Hi, You clicked ClickMe button"
'finishes server processing, returns to client.
Dim strScript As String = ""
strScript += "alert(""" & strMessage & """);"
strScript += ""

If (Not ClientScript.IsStartupScriptRegistered("clientScript")) Then
ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientScript", strScript)
End If
End Sub

Connection Oracle to ASP.NET

under

type this :




so that username for login to dynamic code:
code.vb

strConn = ConfigurationManager.AppSettings("strConn").ToString()
Session("dbConn") = dbconn
Session("userName") = userName
Session("passWord") = passWord

that will add to session every page

Add Route IP With Different Network

If example we connect in 192.168.1.2 (Network 1 : Linksys)

We have server with 2 IP (Example : linksys and Pandawa)

So we need connet to server 192.168.2.1 too

Go to start>Run, typing cmd

Type this :

>route add 192.168.2.0 mask 255.255.255.0 192.168.1.3 -p

-p use for permanent, if our computer shut down, will not gone

> tracert 192.168.2.9

> route print

for see route