|
Change your database schema, you can't have a foreign key that is null. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I have a problem, i have a gridview populated with items and in the pager i have controls for previous and next and a dropdownlist that shows the total number of pages. I also have a search function to search for item.
if i for exemple search for *egg* i get a number of results and the ddl is populated with total number of pages for the searchterm. but if i click on the button for "next" the search result disapear and i get all the pages back (because of the postback) but how do i do to keep the state of the ´search so that i can use the next and previous buttons and the ddl listing of pages, depending on the search?
I have never used viewstate so if someone can explain it well for me i would appreciate it very much! How to write the code and implement it.
I use nhibernate and custom binding/paging
|
|
|
|
|
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
|
|
|
|