|
You need to persist the search criteria in some manner and use it when requering the database. If you are using a textbox to eneter search criteria then enable viewstate and retrieve it's value before querying the database. Along with the page and number fo rows to retrieve of cource.
The builtin support for paging in the datagrid should handle this for you though. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes i use a textbox, how do i retrieve it´s value? i said that i have no knowledge of the use of viewstate. SO i need 2 queries against the database? one to populate the gv with all content and then one under pageindexchanging where i use the search criteria?
|
|
|
|
|
Thommie.h wrote: said that i have no knowledge of the use of viewstate
Then I suggest you stop what you are doing and learn more about ASP.NET.
Thommie.h wrote: SO i need 2 queries against the database?
No. I suggest you also spend some time understanding SQL queries before continuing.
Understanding the tools and technology you are attempting to use will save you (and us) headaches and fustration. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
you are not helping me here, if you can explain a little as i asked from the beginning it would have helped or hint me somewhere.
|
|
|
|
|
And what good would it do? You don't understand the concepts, tools, or technology.
You have all the help and hints you need. Go read. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
and you cant write a understanding answear
|
|
|
|
|
hi,
you can store the search parameters into viewstate
when you click on the button for "next", you needs rebind the data.
you can also store the search parameters and page information in url like this:
http://search.aspx?parameter=egg&page=1
my english is not very well, can u teach me english ? haha~
my msn :fly1126@live.cn
|
|
|
|
|
have Any another method to retrive privous url
Thanks & Regards
Sreedeeplal MS
|
|
|
|
|
hi,
Request.UrlReferrer gets information about the URL of the client's previous request that linked to the current URL.
If user enter the URL manually , then value of Request.UrlReferrer is null
Other method : Request.ServerViables["http_referer"]
if you have any questions, please contact me
My msn: fly1126@live.cn
|
|
|
|
|
Try this..!
Page.Request.UrlReferrer
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
How to create SEO friendly pages in asp,net
Thanks & Regards
Sreedeeplal MS
|
|
|
|
|
Is Google down again? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
|
Hi everyone,
Can anyone give me some idea how can I retrieve information when the user clicked on a specific link without opening a new web page? The information is stored in the database which is through web service.
For example, when the user click on a specific link, e.g the date 28 February 2010, the datagrid will display the information on 28 February 2010.
thank you.
|
|
|
|
|
Ajax I know the language. I've read a book. - _Madmatt
|
|
|
|
|
how to create time sheet application using asp.net with c#,ie when ever employees login and logout
but what tables i have to create in sql server 2005...can you help
|
|
|
|
|
The tables are completely up to how the application is designed and what it needs, there is no template, its up to you I know the language. I've read a book. - _Madmatt
|
|
|
|
|
you should ask specific questions in technical forum.
the table design depends on your requirement. for this, I would suggest a simple design that you can have employee table and time tracking table for employees.
|
|
|
|
|
Hi ,
Is there any way to render an aspx page to string.I used some session variables and server controls in my page.When I render it using
WebClient myClient = new WebClient();
string myPageHTML = null;
byte[] requestHTML;
string currentPageUrl = Request.Url.ToString();
UTF8Encoding utf8 = new UTF8Encoding();
requestHTML = myClient.DownloadData(currentPageUrl);
myPageHTML = utf8.GetString(requestHTML);
this code , it is reloading the page again and session is expiring.Is there anyother way to render it with perfection ?
With regards...
|
|
|
|
|
WebRequest req = WebRequest.Create(strURL);
StreamReader stream = new StreamReader(req.GetResponse().GetResponseStream()); I know the language. I've read a book. - _Madmatt
|
|
|
|
|
WebRequest HttpWebRequest = WebRequest.Create("url");
WebResponse HttpWebResponse = HttpWebRequest.GetResponse();
StreamReader sr = new StreamReader(HttpWebResponse.GetResponseStream(), System.Text.Encoding.UTF8);
string strHtml = sr.ReadToEnd();
|
|
|
|
|
Hi,
I have written http module to catch the errors from my application and then redirect a user to custom error page.
In this case..can't i use try-catch blocks. Since my code contains try-catch blocks..but even it displaying error instead of going to cutom error page.
Can you suggest the way to resolve this?
Regards
SatishG. Satish
|
|
|
|
|
You don't need to write a custom httphandler for this. Handle the Application_Error event in the global.asax and redirect to catch the unhandled exceptions.
How are you trying to redirect in your try/catch blocks? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi guys i want to show no borders in IE, FF and chrome. As my knowledge FF only shows inner borders black by default and chrome shows border for inner and outer as well but IE does not show....
<asp:GridView GridLines="None" Width="100%" ID="InBoxGrid" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" OnRowDataBound="InBoxGrid_RowDataBound" ShowHeader="false" DataKeyNames = "IMessageID" >
<Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate >
<div id="CheckboxBorder"> <asp:checkbox id="chkChild" CssClass="checkbox" runat="server" /></div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate >
<asp:Image runat="server" ID="imgEnvelops" imageurl="../../Images/VisualImages/envelop/envelopeHeader.gif" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="21%">
<ItemTemplate >
<asp:Label ID="lblFromType" Text='<%#Bind("VFromName")%>' runat = "server" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="56%">
<ItemTemplate >
<asp:LinkButton ToolTip='<%#Bind("VSubject")%>' CommandName='<%# Bind("IMessageID")%>' Text='<%# Bind("VSubject")%>' class="styleMaster8" Font-Underline="true" CommandArgument='<%# Bind("IMessageID")%>' runat="server" OnCommand="lnkButtonReport_Command" ID="lnkButtonReport_Command"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="24%">
<ItemTemplate >
<asp:Label ID="lblDDate" Text='' runat = "server"></asp:Label>
<asp:Image runat="server" ID="imgAttachments" Visible="false" imageurl="../../Images/ActionButtons/attach.gif" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate >
<!-- Image Control moved up -->
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
and my skin class is as follows
<asp:GridView runat="server" SkinID="EHRInboxSentGridView"
AllowPaging="False"
AllowSorting="False"
CellPadding="3"
GridLines="Both"
CellSpacing="1"
Font-Names="Arial"
Font-Size="Small"
Width="100%"
BorderStyle="Solid"
BorderWidth="0px"
BackColor="#E7E7E7"
style="font-family:Verdana;font-size:10pt;"
EmptyDataText="No Record Available"
EmptyDataRowStyle-HorizontalAlign ="Center">
<HeaderStyle BackColor="#C9D8EF" Font-Bold="True" ForeColor="#000000" VerticalAlign="Middle" HorizontalAlign="Left" />
<RowStyle BackColor="#EDF2FA" ForeColor="#000000" />
<FooterStyle BackColor="#ffffff" ForeColor="Black" />
<PagerStyle HorizontalAlign="Right" BackColor="#EDF2FA" ForeColor="SteelBlue" Font-Bold="true"/>
</asp:GridView>
As border width is 0px it should not show any border for 3 browsers. but IE is showing properly and different behavior on other browsers. i tried some thing......i copy all the view source from FF and chrome and remove rules="all" and it showed same result as IE.
i have also tried gridLines="None".
I m new developer kindly help me i m stuck in it. thank u
kami
-- Modified Tuesday, February 23, 2010 12:11 AM
|
|
|
|