|
There are two options come to mind:
+ You open the new page and pass the search parameter to this page, the new page is responsible for calling the search APIs and displaying the result.
+ You use the current page to call the search APIs, then persist the result somewhere for example in the Session, and open the new page. The new page should be able to access the persisted result so that it can display on the web page.
Just some ideas.
|
|
|
|
|
Hi..
I have visual studio 2003 and I am trying to use Google Search Web Service(C#).But I got the error:
DataBinder.Eval: 'EProjects.googleapi.ResultElement' does not contain a property with the name title.
The source code of the Web Form that should display the Google Search Results:
using googleapi;
/// <summary>
/// Summary description for GoogleResults.
/// </summary>
public class GoogleResults : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.ImageButton imgPrev;
protected System.Web.UI.WebControls.ImageButton imgNext;
protected System.Web.UI.WebControls.DataList lGoogle;
public EProjects.googleapi.GoogleSearchResult gsR;
public EProjects.googleapi.GoogleSearchService gcs;
private void Page_Load(object sender, System.EventArgs e)
{
gcs=new googleapi.GoogleSearchService();
gsR=gcs.doGoogleSearch(licenceKeyString,Request.QueryString["Query"],
0, 1,true, "", true, "", "", "");
PopulatelGoogle(gsR);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
///Required method for Designer support - do not modify
///the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void PopulatelGoogle(GoogleSearchResult gsR)
{
lGoogle.DataSource=gsR.resultElements;
lGoogle.DataBind();
}
}
}
The HTML code of the same page:
<table height="100%" width="100%">
<tr>
<td colSpan="2">
<asp:datalist id="lGoogle" runat="server">
<ItemTemplate>
<span style="font-size:17px;font-weight:bold;">
<%#DataBinder.Eval(Container.DataItem,"title")%>
</span></br>
<%#DataBinder.Eval(Container.DataItem,"snipper")%>
</br> <a href='<%#DataBinder.Eval(Container.DataItem,"URL")%>'>
<%#DataBinder.Eval(Container.DataItem,"URL")%>
</a>
</ItemTemplate>
<SeparatorTemplate>
</p>
</SeparatorTemplate>
</asp:datalist></td>
</tr>
<tr>
<td align="left"><asp:imagebutton id="imgPrev" Runat="server"></asp:imagebutton></td>
<td align="right"><asp:imagebutton id="imgNext" Runat="server"></asp:imagebutton></td>
</tr>
</table>
I tried to solve this problem for a long time but I couldnt please help.
I am too late but i will never give up
|
|
|
|
|
hi
can anybody tell the difference between configSource and file attributes in web.config file
coolsweety
|
|
|
|
|
+ The file attribute specifies an external file containing custom settings like you do in the appSettings entry of the web.config file. Meanwhile, the external file specified in the configSource attribute contains the settings for the section which you declare the configSource for. For example, if you use the configSource attribute of the pages section, then the external file will contain the settings for the pages section.
+ The custom settings declared in the external config specifified in the file attribute will be merged with the settings in the appSettings section in the web.config file. In the meanwhile, the configSource does not support merging, it means that you'll have to move the entire section settings into the external file.
|
|
|
|
|
thanx very much
coolsweety
|
|
|
|
|
Can i possible to put an infragistics control inside ajax panel
give ur suggesstions with source
-
|
|
|
|
|
What is a infragistic control?
And a please would be nice
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi for all
i need to know how debug in aspx javascript and see what happend in the code javascript
i tryn some advice form internet but it dosent work
someone with some tick
thanks
|
|
|
|
|
|
hi
thanks for the time
i wish clean my command window i dont know to do >cls in my command window
but from this signal > i can write cls and it clean my command window
i konw how i exit from > for can type ?variable
can say me the command to can to go > and can exit from it
thanks for all
|
|
|
|
|
Tne > character is used as prompt by a lot of console tools. It would help if you could mention what it is that you are doing.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I have been implenting a processing page as per this article http://www.codeproject.com/aspnet/AsyncProcessingMessage.asp where I show a processing page and then go on to some other page as needed. My problem is that I want to go back to the original page that called the processing page but when I do this it thinks it is a new page and the IsPostBack is false.
This means that I loose the state of the page including the error message that I would like shown and I must go back to the original page to allow the user to make some changes.
Any ideas?
|
|
|
|
|
Of course it thinks that it is a new page. It is.
If you have anything in ViewState, that is already lost when you leave the page. If you wan't to retain any information, you would have to actually send it along from page to page.
Web pages are stateless by nature, meaning that they are not aware of previous pages, only the information that is actually sent to the page. Every request is a completely new page from scratch, even a postback.
---
b { font-weight: normal; }
|
|
|
|
|
How would I send the information along from page to page? Can you give me a sample to look at?
|
|
|
|
|
The Users are stored in a database on a mySQL server that uses the PASSWORD() function to encrypt the passes. What would be the best way to authenticate users?
I read about the Forms authetnication offered by the login control. I have to install a membership database on the server using aspnet_regsql
What if my mySQL server already has a table that stores the user information? Can i still use aspnet_regsql?
Let's say I dont wanna use the Forms authentication offered by the login control and I want to write my custom control.
|
|
|
|
|
|
I have made a flash interface that opens web pages I have created in asp.net. The problem I have is that my whole site basically needs session variables to run, and these variables are decided on the opening page, which is now Flash, depending on the users selection.
So I know that Flash variables can be sent using POST. But how do I retrieve these variables through Asp.Net/VB.net?
Thanks.
|
|
|
|
|
:|Hi all,
i want to display the page count for the records to display in a page.
i have the total records.
now i want to display the total pages number.for each there will be 10 records.
now if i divide the totalrecords by 10 i may get a float value, but i want to round it to next number ie., if 168/10 = 16.8 i want it to be 17
can anyone help....
|
|
|
|
|
System.Math.Ceiling(16.8) = 17
System.Math.Floor(16.8) = 16
cheers
P
|
|
|
|
|
You don't need to use float values at all. Use this formula:
pages = (items + pagesize - 1) / pagesize
e.g.
pages = (items + 10 - 1) / 10
---
b { font-weight: normal; }
|
|
|
|
|
thanks for your answers!
|
|
|
|
|
I am using a user control to insert some text into one of my asp.net pages.
However I am trying to make the scr="..." dynamic so that it takes the value from a variable which is storing the id from the url. This value is also being used in a database query.
My question is how do i insert a variable (the id from the url) into the <%@ Register...%>, so that i can change the src according to the correct content page?
For example:
<%@ Register TagPrefix="course" TagName="content" Src="course/blue.ascx" %>
But i need something like:
<%@ Register TagPrefix="course" TagName="content" Src="course/" + course_name + ".ascx" %>
where course_code = the id taken from the url
Any help would be much appreciated
|
|
|
|
|
|
I am using the Login control in a contentholder which uses a Master page as its template. But the problem I am having is to get the "Create new Account" hyperlink on the Login page which links to "CreateUser" wizard page.
If I am not using the masterpage, I am able to get the hyperlink to show up. But I want this to work with the Master page.
WEBPAGE code:
<%@ Page Language="C#" MasterPageFile="~/EPay/EPayMasterPage.master" AutoEventWireup="true" CodeFile="PayOnline.aspx.cs" Inherits="EPay_PayOnline" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form id="Form1" runat="server" method="post">
<asp:Login ID="Epay_Login" runat="server" CreateUserText="Create a new Account" CreateUserUrl="~/EPay/CreateUser.aspx" RememberMeSet="false" />
</form>
</asp:Content>
MasterPage code where this content holder is placed:
<td align="left" valign="top" width="562">
<b><asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder></b>
</td>
I felt that it was because the Master page was not using Form, I don't know if it is even reasonable.
Plsss help required asap.
Sowmya Mulukutla,
|
|
|
|
|
If your Master Page contains the form tag marked runat="server" already, then your content page should not contain any form element, so the Content control only contains the Login control in there.
|
|
|
|