|
Hello,
Thank you for your response. I am not certain how I would use that to compare that value against the Username data field in SQL to only display values where loginname is equal to Username (in SQL).
Below is my code for my aspx page.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="document_checklist.aspx.cs" Inherits="document_checklist" Title="Document Checklist Report" %><br />
<br />
<br />
<br />
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><br />
<h2>DOCUMENT CHECKLIST</h2><br />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"><br />
<Columns><br />
<asp:BoundField DataField="user_name" HeaderText="Username" SortExpression="user_name" /><br />
<asp:BoundField DataField="document_name" HeaderText="Document" SortExpression="document_name" /><br />
<asp:BoundField DataField="date_added" HeaderText="Date Added" SortExpression="date_added" /><br />
<asp:TemplateField HeaderText="Document Read"><br />
<ItemTemplate><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<br />
<asp:CheckBoxField DataField="checkbox" HeaderText="Document Read" SortExpression="checkbox" /><br />
</Columns><br />
</asp:GridView><br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:board_loginConnectionString3%>"<br />
SelectCommand="SELECT [user_name], [document_name], [document_type], [date_added], [checkbox] FROM [document_checklist] WHERE ([checkbox] = @checkbox)AND ([username] = @username)"><br />
<SelectParameters><br />
<asp:Parameter DefaultValue='0' Name="checkbox" Type="Byte" /><br />
</SelectParameters><br />
<br />
</asp:SqlDataSource><br />
<br />
</asp:Content>
|
|
|
|
|
Hi all,
I am trying to display 77000 records from Oracle Database to .NET DataGrid. So it is not displaying and getting Application Server Error.
Using OLEDB i did. Is there any way for solving this problem
Thanks
Murali
|
|
|
|
|
Why would you want to show 77000 records ?
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.
|
|
|
|
|
So the user can find the one they want!!
|
|
|
|
|
Better approach is put a search option , when the user puts a Search Criteria the appropriate results would be displayed ,
Because you could not expect a user to move through all 77000 records
|
|
|
|
|
Nishant Singh wrote: Because you could not expect a user to move through all 77000 records
yes, but if he still wants all the records he can have paging enabled.
|
|
|
|
|
Hi,
Yes but the problem the problem is if the paging is enabled also the page is not not displaying due to huge data i think .Is there a way to Display all the records(77000)
Thanks
Murali
|
|
|
|
|
have you calculated the time taken to fetch the data in which back end you are using... because if it takes long time in database then you have to follow indexing... and in the database if the query returns the value soon then there is prolem in your code... Any how can you send your code for further clearance....
|
|
|
|
|
Hi ,
Search option is not accepted here. So is there any other way to display data.
Thanks
Murali
Murali
|
|
|
|
|
What do you mean by 'not accepted' ? Do you mean you have a client who wants to show 77000 records on one page of a website ? Can you think of a single website that shows this much information ? If not, how do you know it's possible, assuming it was at all advisable ?
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 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?
|
|
|
|