|
Hi All,
Please tell me how to write XML query in Asp.net.
I hav temple.xml file which contain data of temple.
now i want to apply search on it.
|
|
|
|
|
Well, this is not an ASP.NET question really, it's a C# or VB.NET question. You can use an XMLDocument and the DOM to search your XML, or I believe you can use LINQ, if you're using 3.5
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Priya ,
U cannot directly Query an XML Decument in ASP.Net 2.0 ,
However you need to parse them to check for the desired result ,
It got significantly easier with LINQ introduced ,
As per your requirement if you are using ASP.net 2.0 create an instance of XMLTextReader and read thru the document
|
|
|
|
|
XMLDocument is far better for searching.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yeh Chris,
I was wrong i did some searching XMLTextReader is a fast forward way of reading data from an xmlDocument .
Much like DataReader ........
|
|
|
|
|
i am trying to apply linkbuttons of images in datalist with the help of these link buttons i want to show images with link buttons in same page.. could u help me plzzzz
|
|
|
|
|
You say you are trying. What have you tried ? Where are you stuck ? Why do you need to use a datalist ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i am learning dotnet dats y i am using......... i apply linkbuttons but on clicking link buttons images are not shown.. if u hav any sol. den tell me.
|
|
|
|
|
OK, so this is for a class ? Or you're just teaching yourself at work ?
You've added link buttons, why do you expect them to show images ? What have you done to make that work ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Give me the codezzzz and txtspk in one!! You've hit the jackpot!!
|
|
|
|
|
*sigh* the number of people I've tried to help today who ask a few questions then just stop posting.....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Was it something you said or something you did? Did your words not come out right?
Though you tried not to hurt them... though you tried...
Well I guess that's why they say evvvvvvvvvvery codezzzzz??!?!?! has it's forum....
|
|
|
|
|
I have a simple code in asp and VB which is used for search in a database (MS Access).All search are done but only one creates an error.When i search by a keyword it show this error. Error is
ADODB.Recordset error '800a0cc1'.Item cannot be found in the collection corresponding to the requested name or ordinal
<%
Dim Sqlbooks
dim checkkeyword, checkarticle
checkarticle="False"
checkkeyword="False"
Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")
dbGlobalWeb.Open("BookDB")
Sqlbooks = "SELECT * FROM Booklist"
Sqlkeyword="SELECT * FROM Keyword11"
sqlarticle="SELECT * FROM Article"
If Request.Form("TypeSearch") = "Accno" Then
Sqlbooks = Sqlbooks & " WHERE Acc_No LIKE '%" & Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Callno" Then
Sqlbooks = Sqlbooks & " WHERE Call_No LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Author" Then
Sqlbooks = Sqlbooks & " WHERE Author LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Title" Then
Sqlbooks = Sqlbooks & " WHERE Title LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "ISBN" Then
Sqlbooks = Sqlbooks & " WHERE ISBN LIKE '%" & _
Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Publisher" Then
Sqlbooks = Sqlbooks & " WHERE Publisher LIKE '%" & Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Binding" Then
Sqlbooks = Sqlbooks & " WHERE Binding LIKE '%" & Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Subject" Then
Sqlbooks = Sqlbooks & " WHERE Subject LIKE '%" & Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Keyword1" Then
checkkeyword="True"
Sqlkeyword = Sqlkeyword & " WHERE Keyword1 LIKE '%" & Request.Form("DaInBox") & "%'"
End If
If Request.Form("TypeSearch") = "Article" Then
checkarticle="True"
Sqlarticle = Sqlarticle & " WHERE Article LIKE '%" & Request.Form("DaInBox") & "%'"
End If
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")
If checkkeyword="True" then
rsGlobalWeb.Open Sqlkeyword, dbGlobalWeb, 3
<%End If
End If
End If
How i solve this error i check almost all the solution in google but not find any change. plz help
|
|
|
|
|
This is the ASP.NET forum, this looks like asp. asp has been obsolete for 7 years, why are you using it ? I recommend the web development forum for asp questions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Well, your code above refers to Keyword11, whereas the code below refers to Keyword1... perhaps there's a typo in one or the other?
|
|
|
|
|
You READ all that ? You have too much time on your hands....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Nah, I just skimmed it, and noticed the bold sections, which may have indicated that's where the OP thought the problem was...
|
|
|
|
|
How can I retrieve 1700 or more rows of data from SQL server to a Classic ASP page in an Efficient way?
I have a management royality report which uses multi-dimensional arrays, but the script is very slow it takes 4 to 5 minuts to load.
Can someone suggest a best practice for this problem.
Thank you.
|
|
|
|
|
Naeem ul Haq wrote: How can I retrieve 1700 or more rows of data from SQL server to a Classic ASP page in an Efficient way?
By not displaying 1700 rows of data on a single page.
Naeem ul Haq wrote: I have a management royality report which uses multi-dimensional arrays, but the script is very slow it takes 4 to 5 minuts to load.
Ensure you are letting SQL Server do the data work for you, and only display a small portion of it at a time.
|
|
|
|
|
Naeem ul Haq wrote: Classic ASP
This is the ASP.NET forum. As Damian said, the best practice is to design your page to be sane, but either way, this is the ASP.NET forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
You need to do several things.
1 - the user needs to select an image
2 - the user needs to push the button
3 - the page needs to post back
4 - you need to save the image somewhere
5 - you need to send the page back with the source of the image control being set to where-ever you saved the image.
You can save it in the file system, under the application root ( use Server.MapPath to find the file system equivalent ), or to a database, and then you'd need to write a page which returns the bytes of the image and the correct MIME type, taking the id of an image on the URL, and set the control to that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Why do you need it ? What are you trying to do ? Which bit are you stuck on ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You are an idiot. You asked how to do something very trivial, I explained it, then you demanded I give you source code. If this is homework, you need to understand it in order to learn. I was trying to help you to understand the problem.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
modified on Tuesday, November 3, 2009 3:43 PM
|
|
|
|