|
Hi.,
How to call a webservice using javascript in vb.net, inline code using Ajax. I am using Atals, i have two textbox, first text box is autocomplete, autocomplete done using ajax, after the first text box is filled, the second text box should be filled depending on the first text box values.
Please guide me with examples.
Thanks and Regards
Shyam
|
|
|
|
|
This is a question better suited for the ASP.NET or Web Development forums.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am posting the same problem 2nd time. Sorry for that but the strange thing is happening in the function. It suppose to display a message but it is giving me "An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object." error message. It loads the file there in no problem. Either keys and values exist in the file also. The message boxes display nothing. What is causing the problem? Thank you. Here is my code:
The file is under application.startuppath /bin/debug directory
Private Function GetCnfgParameter(ByVal MyKey As String) As String
Dim DocXml As New XmlDocument
Dim NodeXml As XmlNode = Nothing
DocXml.Load(Path.Combine(Application.StartupPath, "app.xml"))
NodeXml = DocXml.DocumentElement.SelectSingleNode("//configuration/AppDefaultValues/add[@key=""" & MyKey & """]")
If TypeName(NodeXml.Attributes.GetNamedItem("value")) <> "Nothing" Then
NodeXml = NodeXml.Attributes.GetNamedItem("value")
MsgBox(NodeXml.Value)
Else
'No @ mykey attribute in attributes collection
MsgBox("Could not find the @mykey attribute as in a <add mykey=''> element.")
End If
Return NodeXml.Attributes.GetNamedItem("value").Value
NodeXml = Nothing
End Function
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: NodeXml = DocXml.DocumentElement.SelectSingleNode("//configuration/AppDefaultValues/add[@key=""" & MyKey & """]")
This line is prone to "Object reference not set to an instance of an object" error. You will have to check whether NodeXml is nothing before using it further.
JUNEYT wrote: TypeName
What is this used for ? and what does it returns ?
JUNEYT wrote: <> "Nothing"
If you are trying to compare returned value for nothing / null then you will have to write -
not ({expression} is nothing)
or
not ({expression} = nothing)
Use the 'is' keyword if the return of the {expression} is a reference type else use '='
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Thank you very much I solved the problem. The back slash was causing it.
cheers!
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Also,
I got two Table Name Volume and VolumeLessons .
I have used a Query to make a SingleTable name Query_Volume_VolumeLessons, now this table is inside my code or Prject not in SQL SERVER DataBase.
Now I need to pull data from Query_Volume_VolumeLessons to make another two table name Query_Volume_Sector and Query_Volume_Themes for further work and then lots of thing....................
Please help me
Sarfarj Ahmed
|
|
|
|
|
In my opinion instead of making a table, populate a dataset with your query as because you can easily loop through your dataset to do your operation....
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
Thanks for your reply
I have alredy added a DataSet name Publications where I have add three tables.
Table(0) is Query_Volume_VolumeLessons
Table(1) is Query_Volume_Sectos
Table(2) is Query_Volume_Themes
Also put data on Table(0) from SQL SERVER DataBase
Now How can I put data to Table(1) From Table(0) , using a sqlQuery
Thanks
Sarfarj Ahmed
|
|
|
|
|
Sarfaraj Ahmed wrote: Urgent 002
This is a useless subject line. Please use more appropriate subject lines in future. Hint: No appropriate subject line will include the word "urgent"
|
|
|
|
|
Thanks for ur Email
Can you help me?
Sarfarj Ahmed
|
|
|
|
|
This is the 6th post you've title with "urgent" or "please help." Many people will avoid answering these questions with such subjects.
_________________________________________
You can't fix stupid, but you can medicate crazy.
|
|
|
|
|
I need some instruction and help
Customer Table
CustID CustName
01 ABC
02 ACB
03 ADB
Order Table
OrderID CustID
1001 01
1002 01
1003 01
1004 02
1005 02
1006 03
1007 03
1008 03
1009 03
1010 03
I want those output like below
CustID CustName OrderID
01 ABC 1001, 1002, 1003
02 ACB 1004, 1005
03 ADB 1006, 1007, 1008, 1009, 1010
Please help me. Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
I think you cannot do it in single SQL query.....
populate a dataset with following query..
SELECT Customer.CustID, CustName, OrderID<br />
FROM Customer INNER JOIN Orders ON Customer.CustID=Orders.CustID
then loop through your dataset to make customized dataset or datatable which you want ....where you can concatenate the OrderID fields....
did u get me???
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
How can I make a customized dataset or dataTable and how can I concatenate the OrderID fields.
please send me more instructions with some code
Waiting for ur reply.......
Sarfarj Ahmed
|
|
|
|
|
Sarfaraj Ahmed wrote: Urgent 001
This is a useless subject line. Please use more appropriate subject lines in future. Hint: No appropriate subject line will include the word "urgent"
|
|
|
|
|
Hi there,
I have been given the task of writing a Windows Forms Application that uses a web cam to take photos for ID cards. I am fine with everything except for interfacing with the camera. Has anyone got any links or ideas on how I can achieve this please? I have had a look about the web but I can not seem to find any information on this.
Thank you for your time,
Adam Smith
Regards,
Adam - Tutor @ Barnfield
|
|
|
|
|
You might want to search for an SDK from the manufacturer of the camera. If you they don't offer one, you can Google for "Windows Image Acquisition" or "WIA VB.NET" for examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you for your response. I will give it a go.
Regards,
Adam - Tutor @ Barnfield
|
|
|
|
|
Hi,
My string contains a number followed by hiphen and then followed by text say
string1 = "1239980 - Microsoft" . Here, "-" is used as a delimiter.
How do i only retrive number from a string.This is my following code.
Dim a As String
Dim b As String
a = "1239980 - Microsoft"
b = a.Substring(0, Len(InStr(a, "-")) - 2)
The value of InStr(a, "-") is 9 which indicates the index of position of "-". Now i want to extract first 7 characters i.e the number part... What i will do??? Please help me...
Thanks and regards,
Shyam
|
|
|
|
|
Dim strTemp As String = "1239980 - Microsoft"
Dim arrSplit As Char() = {"-"}
Dim arrString As String() = strTemp.Split(arrSplit)
Dim strFinal As String = arrString(0)
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Actually this was i am expecting...
thanks dude...
Thanks for ur kind help.....
Shyam T S
|
|
|
|
|
Hi there,
Give this a go if you only ever want the first 7 characters:
Dim a As String
Dim b As String
a = "1234567 - Microsoft"
b = a.Substring(0, 7)
MsgBox(b)
Regards,
Adam - Tutor @ Barnfield
|
|
|
|
|
Hi Shyam,
The following code is a bit crude, but it allows for any length number, and you can use it to handle other strings with different delimiters in your app as well:
<br />
Public function BeforeTheDelimiter(ByVal MyString as String, ByVal dlmtr as String) As String<br />
'Example: MyString = "1239980 - Microsoft" and dlmtr = " - "<br />
Return Mid(MyString, 1, MyString.IndexOf(dlmtr)) <br />
'result: BeforeTheDelimiter returns 1239980<br />
End Function<br />
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks for ur kind help.....
thanks and regards,
Shyam T S
|
|
|
|
|
Hello,
VS 2005
Might sound like a stupid question.
I went to my toolbox to find that the project components are missing. Normally the top tab in the toolbox. I have tried everything to get it back.
Nothing happend and there was no error messages, they just disappeared.
When I open up an early version of my project they are there, but not in my current project.
I have a typed dataset, and cannot add the table adapters to the form as the project components are gone.
Hope you understand what I mean. Normally they are the name of your project in the top tab in the toolbox.
Thanks for any advice on this,
|
|
|
|