|
hi....
i understand your qus... but want to ask following....
1. is emp_id is same as sequential number....
2. u have taken emp_id char(3) then why it is 01,02,.....
just clear these .....
ok....
|
|
|
|
|
ya i have taken emp_id as char(3) so that while i entry the value 01 in the front end it should be taken as 01 not1. if i will take emp_id as int then if i input 01 it wil take 1 only. thats why i have taken as char.
No emp_id is not a sequential no..it can be any number..
sorry 4 d late response
|
|
|
|
|
i have a checkboxlistitem.where let say A,B,C,D,E are the items in that control.
and below that 5textboxes are there named as textbox1,textbox2......textbox5.
initiallay all textboxes are disabled.now i want when ever i select A the corresponding checkbox should be enable i.e textbox1.
and likewise if i select B then textbox2, if Dthen textbox 4.likewise.
what will be the vb.net code for it.
(i have tried with if and elseif but its not working. as when the 1st condition is satisfied its coming out of the loop.)
|
|
|
|
|
hello...
Try this out ...
I had done in C# and convert it to vb
Protected Sub CheckBoxList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
For i As Integer = 0 To CheckBoxList1.Items.Count - 1
Dim txt As String = ""
If CheckBoxList1.Items(i).Selected Then
txt = CheckBoxList1.Items(i).Text
Select Case txt
Case "A"
TextBox1.Enabled = True
Exit Select
Case "B"
TextBox2.Enabled = True
Exit Select
Case "C"
TextBox3.Enabled = True
Exit Select
Case "D"
TextBox4.Enabled = True
Exit Select
Case "E"
TextBox5.Enabled = True
Exit Select
Case Else
Exit Select
End Select
Else
txt = CheckBoxList1.Items(i).Text
Select Case txt
Case "A"
TextBox1.Enabled = False
Exit Select
Case "B"
TextBox2.Enabled = False
Exit Select
Case "C"
TextBox3.Enabled = False
Exit Select
Case "D"
TextBox4.Enabled = False
Exit Select
Case "E"
TextBox5.Enabled = False
Exit Select
Case Else
Exit Select
End Select
End If
Next
End Sub
|
|
|
|
|
when ever i select A the corresponding checkbox should be enable
TextBox or CheckBox ??????
apply all checkbox's ID as "amenities"
and textboxes id like Amenities0,Amenities1,Amenities2,Amenities3.........
<br />
function clickAll(e) <br />
{<br />
var txtId="amenities";<br />
<br />
<br />
for (var i = 0; i < e.form.elements.length; i++) <br />
{<br />
<br />
if (e.form.elements[i].name == "amenities") <br />
{<br />
txtId+=i;<br />
<br />
if(e.form.elements[i].checked == true)<br />
{<br />
document.GetElementById(txtId).style.display="block";<br />
}<br />
else<br />
{<br />
document.GetElementById(txtId).style.display="none";<br />
}<br />
}<br />
}<br />
return true;
} <br />
<br />
If you got any error try to solve your self
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi,
I am trying to create a dynamic connectionString with windows authentication. I prepared like this
"Integrated Security=SSPI;Initial Catalog=northwind;Data Source=server-Name"
It is running good from my application. I configured this application in IIS
and ran like this 'http:/localhost/ApplicationName' but it is failed to login.
How to run an application with windowAuthentication connectionString from IIS?
Thanks
Hari
|
|
|
|
|
Go to the properties dialog of your web application in IIS. Check whether integrated windows-authentication is enabled or not. and check whether anonymous is disabled or not...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
Thanks for your reply, and I did the same thing which you suggested but it failed to do the trick. Is there any other solutions. Please forward me.
Thanks
Hari
-- modified at 2:06 Monday 3rd September, 2007
|
|
|
|
|
maybe. you may try to impersanate...
Put this in web.config.
<identity impersonate="true" />
You have the administrator right in that machine... right?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
Thanks for your quick reply.
Yse. I have administrator rights in my system.
I added impersonate in web.config file..
<system.web>
............
............
<identity impersonate="true" />
</system.web>
Again no use....any other Michael?
Thanks in advance
Hari
|
|
|
|
|
When are you getting this error? What error are you getting??
Are you getting this error while you are trying to log-in from browser? OR while you are trying to open the connection?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello Everyone ,
how to get data from database using web services concept in asp.net 2.0
with c#..
Please suggest different methods like using gridview etc...with step step by process..
Many Thanks
VIJAY
|
|
|
|
|
dhulipudi wrote: how to get data from database using web services concept in asp.net 2.0
with c#..
Do you know to get values from database on an ASPX page ? If yes, your question doesn't make any sense. The same way you can fetch information from webservice also. But when returning a set of data from webservice to your application requires a serialized class. Some classes in ADO.NET are not serialized.
dhulipudi wrote: Please suggest different methods like using gridview etc...with step step by process..
You won't be able to use gridview/datagrid in webservice. These controls are meant for providing user interfaces. Webservice would be a set of functions that resides on the remote server.
|
|
|
|
|
Thank You ,
can u give me a example on how to get data from database, useing web services.
Vijay
|
|
|
|
|
dhulipudi wrote: can u give me a example on how to get data from database, useing web services.
I presume that you are familiar with webservices.
1 - First create a webservice method
2 - Use SQLClient name space for SQL database
3 - Create connection using SQLConnection
4 - Create command object using SQLCommand
5 - Write query and fetch data
6 - Return data.
|
|
|
|
|
Thank You,
I am not familiar please can u give some good examples then i can
understand clearly, and i can do...
Vijay
|
|
|
|
|
Hi All,
I have two connection entrie in my web my web.config named projects_connection, and customer_connection.
Using VB, in the code behind for my aspx, how can I call the either project_connection or customer_connection from web.config and make the connectionstring for my data objects ie datareader, command object etc?
Thanks!
Nanfa
|
|
|
|
|
You have to use ConfigurationManager.AppSettings("ConnectionName") to get the values.
|
|
|
|
|
Public Function SqlOpen(ByVal Val As Integer)
Try
If Val = 1 Then
Me.sqlCon.ConnectionString = ConfigurationSettings.AppSettings("ConnectionString KEy1")
ElseIf Val = 2 Then
Me.sqlCon.ConnectionString = ConfigurationSettings.AppSettings("ConnectionString KEy2")
End If
sqlCon.Open()
Return sqlCon
Catch ex As Exception
Err = ex.Message.ToString
End Try
End Function
Try the above to establish connection by passing parameter to this funtion as
sqlopen(1) [or] sqlopen(2)
sathimailin
|
|
|
|
|
|
I'm building a new website for a wireless network that i want to test the client's settings and security before it is allowed on to the proper network i was going to di this in PHP but because PHP can't do that stuff i am going to have to learn ASP.NET. I have never coded ASP.NET and i have only got two weeks to get this website working, any help with this would be greatly appreciated
|
|
|
|
|
What sort of help do you need? I would recommend search through the articles when you are stuck, maybe Google too, before posting any questions. If you still have problems understanding something, or can't find anything that helps, by all means post your question.
FYI, posting here works better when you have specific questions to ask, not something like "I don't know ASP.NET and I need help"...
|
|
|
|
|
|
Hello.
I am working on a project where users can automatically create personnel advices on the mainframe through a .NET Web Service.
My current problem is that I am trying to call a function multiple times to write out the advices to different folder, based on the color sent to the function. However, the program only writes the advices out to one folder. Can you help based on the code that I am attaching to the email?
<webmethod(description:="calls aci="" function="" on="" mainframe="" call")=""> _
Public Function DoAciFunction(ByVal Key As String, ByVal Flag As String, ByVal UserID As String, ByVal ChgType As String, ByVal OrgPH As String, ByVal DocType As String) As String
Dim SendKey As String = " " & Key
Dim Color As String = "Blank"
Dim ColorFile As String = "Goldenrod"
Dim ColorPayroll As String = "Yellow"
Dim ColorBenefits As String = "Green"
Dim z As Integer
Dim PDFColor()
PDFColor(0) = Color
PDFColor(1) = ColorFile
PDFColor(2) = ColorPayroll
Try
For z = 0 To 2
If PDFColor(z).GetValue = 0 Then
Exit For
End If
CreateP17PDF(Flag, UserID, SendKey, PDFColor(z)) ‘This is supposed to happen 3 times!!!!!!
Next z
Dim TestKey As String = Flag & SendKey & OrgPH
Return "0000" & TestKey 'Run without errors.
Catch ex As Exception
DoAciFunction = ex.ToString
Dim TestKey As String = Flag & SendKey & OrgPH
Return "999X" & ex.Message & TestKey 'Run with errors.
End Try
Public Function CreateP17PDF(ByVal FlagCode As String, ByVal User As String, ByVal Key As String, ByVal Color As String) As String
Try
imp = ImpersonationHelper.Impersonate("SCDOT", Me.GetType(), "SCDOT")
For i = 0 To P17.EMP.Length - 1
If Trim(P17.EMP(i)) = "" Then
i = P17.EMP.Length
Else
DocName = "P17" & Mid(Key, 4, 4) & Mid(Key, 2, 2) & Trim(P17.ORG(i)) & Mid(P17.PH(i), 2, 2) & Trim(P17.EMP(i)) & "A" & Trim(P17.LCX(i)) & ".pdf"
Select Case Color
Case "Blank"
FolderPathColor = "Original\"
Case "Goldenrod"
FolderPathColor = "File\"
Case "Yellow"
FolderPathColor = "Payroll\"
Case Else
FolderPathColor = "Original\"
End Select
FolderPath = P17Doc() & "\" & Mid(Key, 4, 4) & Mid(Key, 2, 2) & FolderPathColor ‘This is supposed to print out to three different folders.
If Not System.IO.Directory.Exists(FolderPath) Then
System.IO.Directory.CreateDirectory(FolderPath)
End If
If User = "" Then
DocEmpName = P17.EMP(i) & "ET.pdf"
Else
DocEmpName = P17.EMP(i) & "U" & User & ".pdf"
End If
'DocEmpName = P17.EMP(i) & ".pdf"
EmpFolderPath = P17Doc() & "\" & Mid(Key, 4, 4) & Mid(Key, 2, 2) & FolderPathColor & "\EmployeeIDs\"
If Not System.IO.Directory.Exists(EmpFolderPath) Then
System.IO.Directory.CreateDirectory(EmpFolderPath)
End If
OutputFile = FolderPath & DocName
OutputEmpFile = EmpFolderPath & DocEmpName
Dim x As Integer = 0
Dim P17Page As ceTe.DynamicPDF.Page
Dim P17Document As New MergeDocument
Dim Path As String
P17PageDims = New PageDimensions(PageSize, PageOrientation)
P17PageDims.LeftMargin = LeftMargin
P17PageDims.RightMargin = RightMargin
P17PageDims.TopMargin = TopMargin
P17PageDims.BottomMargin = BottomMargin
Select Case Color ‘These are the different forms that the web service is pulling, based on the color sent.
Case "Blank"
Path = "BlankForms\P-17Blank.pdf"
Case "Goldenrod"
Path = "BlankForms\P-17File.pdf"
Case "Yellow"
Path = "BlankForms\P-17Payroll.pdf"
Case Else
Path = "BlankForms\P-17Blank.pdf"
End Select
P17Page = New Page(P17PageDims)
P17Document.Append(Server.MapPath(Path))
P17Page = P17Document.Pages(x)
'Print P17 details
P17Name = New Label(P17.NAME(i), colName, Row1, Width(cwName), LineSize, Font, FontSize, Left)
P17Page.Elements.Add(P17.Name)
P17Document.Draw(OutputFile)
P17Document.Draw(OutputEmpFile)
End If
Next i
Thanks.
murdlag
|
|
|
|
|