Skip to main content

AccessTr.neT


webbrowser İF hakkında

webbrowser İF hakkında

Çözüldü #1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error Resume Next

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 1)

End Sub

Bu kod ile açılan sayfada "isyeriacilisyil" id li alanın "1" (MERKEZ) alanını seçtirtiyorum. ("2" ŞUBE)

Bana bu işlemden önde bir if lazım onunda şartı şudur

Eğer textbox1 de veri varsa

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 1)

Eğer textbox2 de veri varsa

Me.WebBrowser1.Document.GetElementById("isyeriacilisyil").SetAttribute("Value", 2)

Eğer textbox1 ve textbox2 de aynı anda veri varsa "Merkezmi Şubemi kaydı yapılacak" şekline soru sormasını istiyorum. Teşekürler
drummers, 11-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla
Çözüldü #2

If (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Boş - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("1 Boş - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

İki tane metin kutusu : textBox1 ve textBox2 ekleyin. Bir buton ekleyin ve Click olayına yukarıdaki kodları yapıştırın. Tüm ihtimallere göre if yapınız bu şekildedir.
AccessTr.Net teknik konular içeren bir sitedir. Bu tip sitelerde en iyi şekilde yardım alabilmeniz için Site Kurallarını mutlaka okumanız ve buna göre hareket etmeniz lazım.
Cevapla
Çözüldü #3
(30/05/2012, 13:47)alpeki99 yazdı:

If (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Boş - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("1 Boş - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

İki tane metin kutusu : textBox1 ve textBox2 ekleyin. Bir buton ekleyin ve Click olayına yukarıdaki kodları yapıştırın. Tüm ihtimallere göre if yapınız bu şekildedir.

Teşekkürler
drummers, 11-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task