Click here to Skip to main content
15,902,112 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to solve this error?? Pin
Dipan Patel From Gandhinagar6-May-06 3:16
Dipan Patel From Gandhinagar6-May-06 3:16 
GeneralRe: how to solve this error?? Pin
Colin Angus Mackay6-May-06 3:19
Colin Angus Mackay6-May-06 3:19 
GeneralI already do this..my dear sir... Pin
Dipan Patel From Gandhinagar6-May-06 3:35
Dipan Patel From Gandhinagar6-May-06 3:35 
GeneralRe: how to solve this error?? Pin
Dipan Patel From Gandhinagar6-May-06 3:24
Dipan Patel From Gandhinagar6-May-06 3:24 
GeneralRe: how to solve this error?? Pin
Colin Angus Mackay6-May-06 3:31
Colin Angus Mackay6-May-06 3:31 
GeneralMy dear sir .. it works.. Pin
Dipan Patel From Gandhinagar6-May-06 3:38
Dipan Patel From Gandhinagar6-May-06 3:38 
GeneralRe: My dear sir .. it works.. Pin
Colin Angus Mackay6-May-06 3:43
Colin Angus Mackay6-May-06 3:43 
GeneralOK sir i send the code.. Pin
Dipan Patel From Gandhinagar6-May-06 3:52
Dipan Patel From Gandhinagar6-May-06 3:52 
-- this is code for connect.vb

Imports System.Data.SqlClient

Public Class connect
Dim str As String
Dim conn As New SqlConnection
Public ds As DataSet
Dim cmd As SqlCommand

Public Sub setconnection()
str = ConfigurationSettings.AppSettings("connstr")
conn.ConnectionString = str

End Sub

Public Function adpter(ByVal pstr As String) As SqlDataReader
Dim s As SqlDataReader
conn.Open()
cmd = New SqlCommand(pstr, conn)
'cmd.CommandTimeout = 15
s = cmd.ExecuteReader()
Return s

End Function

end class
-----
In my "fees.aspx" form

Imports System.Data.SqlClient

Public Class RegularFees
Inherits System.Web.UI.Page

Dim Conn As New connect
Private Sub SAVE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAVE.Click

Dim dr As SqlDataReader
Dim query as String

query = "Select * from ENQUIRY where enquiryformno=2"
dr = Conn.adpter(query)

If dr.Read Then
txtPayment.text=dr(0)
End If
End Sub
End class

--------
so u better try it...


Dipan Patel.
GeneralRe: OK sir i send the code.. Pin
Colin Angus Mackay6-May-06 4:35
Colin Angus Mackay6-May-06 4:35 
GeneralRe: OK sir i send the code.. Pin
Dipan Patel From Gandhinagar6-May-06 4:42
Dipan Patel From Gandhinagar6-May-06 4:42 
GeneralI give up Pin
Colin Angus Mackay6-May-06 4:47
Colin Angus Mackay6-May-06 4:47 
GeneralRe: OK sir i send the code.. Pin
Ista6-May-06 18:25
Ista6-May-06 18:25 
QuestionDropDownList and javascript Pin
Uma Kameswari6-May-06 0:21
Uma Kameswari6-May-06 0:21 
AnswerRe: DropDownList and javascript Pin
asithangae6-May-06 1:42
asithangae6-May-06 1:42 
AnswerRe: DropDownList and javascript Pin
enjoycrack6-May-06 14:45
enjoycrack6-May-06 14:45 
QuestionAccess Usercontrols server-side objects from code behind in aspx page Pin
Ramya SM6-May-06 0:09
Ramya SM6-May-06 0:09 
AnswerRe: Access Usercontrols server-side objects from code behind in aspx page Pin
ssoffline8-May-06 0:32
ssoffline8-May-06 0:32 
GeneralRe: Access Usercontrols server-side objects from code behind in aspx page Pin
Ramya SM9-May-06 22:43
Ramya SM9-May-06 22:43 
GeneralRe: Access Usercontrols server-side objects from code behind in aspx page Pin
ssoffline11-May-06 5:56
ssoffline11-May-06 5:56 
QuestionDisplay image from database in dotnet2005 Pin
arpita20065-May-06 22:19
arpita20065-May-06 22:19 
QuestionOpen client Path on Web browser. Pin
jaintirthesh5-May-06 20:36
jaintirthesh5-May-06 20:36 
AnswerRe: Open client Path on Web browser. Pin
User 17164926-May-06 2:35
professionalUser 17164926-May-06 2:35 
GeneralRe: Open client Path on Web browser. Pin
jaintirthesh7-May-06 18:55
jaintirthesh7-May-06 18:55 
AnswerRe: Open client Path on Web browser. Pin
Ista6-May-06 18:29
Ista6-May-06 18:29 
GeneralRe: Open client Path on Web browser. Pin
jaintirthesh7-May-06 18:51
jaintirthesh7-May-06 18:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.