WCF / ASMX :: Tied Of Google And Search
Aug 31, 2010It is very difficult to find debugging a solution for a web service in .net
How to debug a SOAP message
It is very difficult to find debugging a solution for a web service in .net
How to debug a SOAP message
Im getting no postback on my button? I have it tied to Javascript like so:
<script type="text/javascript">
function confirm_delete()
{
if (confirm("Are you sure you want to delete this comment?")==true)
return true;
else
return false;
}
</script>
<p>
<asp:Button ID="btn" OnClientClick="if(confirm_delete()){/* post back*/}else{return false;};" OnClick="btnDelete_Click" runat="server" CssClass="Btn" Text="delete"/>
But when I click ok on confirm no postback is initiated, its initiated if I click the button manually?
private void PopulateWallPosts(string userId)
{
using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;"))
{
cn.Open();
using (OdbcCommand cmd = new OdbcCommand("SELECT idWallPosting, wp.WallPostings, p.PicturePath FROM WallPosting wp LEFT JOIN User u ON u.UserID = wp.UserID LEFT JOIN Pictures p ON p.UserID = u.UserID WHERE wp.UserID=" + userId + " ORDER BY idWallPosting DESC", cn))
{
//("SELECT wp.WallPostings, p.PicturePath FROM WallPosting wp LEFT JOIN [User] u ON u.UserID = wp.UserID LEFT JOIN Pictures p ON p.UserID = u.UserID WHERE UserID=" + userId + " ORDER BY idWallPosting DESC", cn))
using (OdbcDataReader reader = cmd.ExecuteReader())
{
test1.Controls.Clear();
while (reader.Read())
{
System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
div.Attributes["class"] = "test";
div.ID = String.Format("{0}", reader.GetString(0));
// this line is responsible, problem here and my sqlsntax, im trying to set the SELECT idWallPosting for the div ID
Image img = new Image();
img.ImageUrl = String.Format("{0}", reader.GetString(2));
img.AlternateText = "Test image";
div.Controls.Add(img);
div.Controls.Add(ParseControl(String.Format(" " + "{0}", reader.GetString(1))));
div.Attributes.Add("onclick", "return confirm_delete();");
div.Style["clear"] = "both";
test1.Controls.Add(div);
}
}
}
}
}
protected void btnDelete_Click(object sender, EventArgs e)
{
string id = "ctl00_ContentPlaceHolder1_ContentPlaceHolder2_26";
string[] idFragments = id.Split('_');
id = idFragments[idFragments.Length - 1];
//serverside code if confirm was pressed.
using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;"))
{
cn.Open();
using (OdbcCommand cmd = new OdbcCommand("DELETE FROM WallPosting WHERE idWallPosting = " + id + ")", cn))
{
cmd.ExecuteNonQuery();
}
}
//PopulateWallPosts();
}
EDIT: Tryed this,
function confirm_delete()
{
if (confirm("Are you sure you want to delete this comment?")==true)
return true;
else
return false;
}
</script>
<p>
<asp:Button ID="btn" OnClientClick="return confirm_delete();" OnClick="btnDelete_Click" runat="server" CssClass="Btn" Text="delete"/>
still no postback
currently I am doing a web application such that after user search for all the contracts,the contract id is a hyperlink in which user can click on it to view the results tied to it. There is 2 pages. One is for the search page and after searching results is populated below. The contract id in the grid view is a hyperlink so that when user clicks on it, they will go to another page and view the specific records tied to it. How shld I do this as I am creating this web application in 3-tier formatting.
This is the search.aspx:
[Code]....
This is the next page that will display the results tied to this particular ID:
[Code]....
I am trying to implement a search solution for my website and was wondering whether there are other good search solutions I can use apart from adding a Google search box
View 1 Repliesi want make the search box for my website same like google have for it's site(ajax search box).i want as soon as i type something in my search box the realted link's of my site should be availble for the user.
View 2 Replieshow to integrate google search inour project if i haven't purchased server
View 11 Repliesi need the procedure of how to get the GSE API from google and use this API to my code
View 1 Replieswe are replacing our current search engine with GSA in one of the portal sites. The GSA admin sets up everything we need for (collections, dedicated IP, Indexing). How do i get the results from GSA and format it (results will be in XML) and present to the user like google search results (Title, summary ...) in C#.
View 1 RepliesI want to add a search to my ASP.NET app, and I would like to show suggestions in a window just below the text box where the user is typing (as they type), just like Google search. I think it has to be done with AJAX, right ?
View 4 RepliesI'm using the Google Places API to discover information on a restaurant. [URL] ....
I need my name parameter to contain an & because I am looking for D'Agostino's Pizza & Pub. But I am not sure what my URL needs to look like, because my requests are returning no matches. I am trying:
maps.googleapis.com/maps/api/place/nearbysearch/json?location=41.8957646,-87.6553512&radius=5000&types=restaurant|food&name=D'Agostino's Pizza %26 Pub&key=<mykey>. But is that even right?
I believe the search should return results, because in google if you type "D'Agostino's restaurant north ogden avenue Chicago IL", it's a perfect match there.
i have search button in my page i want when user type word in TB and click on search button google search in my website and find that word in my web site and link to the page .
View 1 RepliesI'm trying to create an interface similar to google's search box.
When you type a search string into the box, the drop panel appears suggesting all matches to the search as it's being typed.
Anyone know how do we do this with ASP.net?
Is there a way to prevent search engines from indexing a site by modifying the ASP.NET Web.config file?
View 2 Repliesi have awebsite and i made all my steps to make it in the first links on the search of google (SEO) and now i want to go to google updates to make the steps that apply the website on google after one day almost. can any one tell me what i should begin with or do?
View 7 Replieshow i can parse Google search result into title, desc and urls?
View 1 RepliesAnybody seen any c# code examples for using Google site search to send a request to the Google search api and return the results in xml?
View 1 RepliesSo I have a website that I recently made changes to, and one of the changes was removing a page from the site. I deleted the page, it doesn't exist anymore.
However, when you search for my site, one of the results is the page that I deleted. People are clicking on the page and getting an error.
How do I remove that page from the search results?
how could I include the functionlaity in my ASP.NET MVC site to allow users to search and download image from Google. Basically, I am planning to build the search interface where user can type image name and click search. It should then return the image set and user should be able to select any of them.
View 2 RepliesI saw on the google when search "code project", some keywords and a text field and a button to search that google has generated for "code project" keyword also for "manchester university" in the same way.
How is it possible to show key words and text field/button for our website on google? As it shows for "code project" and "manchester university" etc.
visit google and search "manchester university" u'll see:
StudentNet Job Opportunities
PostGraduate StaffNet
etc..
and
textfield/ and a button
I want this kind of result for my site from Google!!
How to do image search like google...
View 1 Replieshow to use google geolocation api ?
View 3 RepliesI have a textbox and what I would like to implement is basically a situation similar to what you have in google when you type in a word. In otherwords,
in the textbox when you type in J, it should generate a list of names that starts with O in alphabetical order, then next when you type in o, so that now you have Jo, it should generate a list of names instead that now starts with Jo in alphabetical order, then again when you type in h, it should generate a list of names that starts with Joh and so on.
I'd like to add google maps to my web page. I am looking for a way that user will seach for desired location. In google's page [URL] .... there is a really nice search mechanism, by simple typing location in a text box. Is that mechanism available for sites or do i have to create mine..
View 8 RepliesI am using asp.net 2010, and I would like to know how can I go about completely hiding a particular page from search engines, similar to how Facebook's security settings are set (for example, if I search for my real name, my fb page will now show up in google).
View 3 RepliesI used below link to use google search engine in my page [URL]....
here google put default for textbox and button search engine Height and width
I put code into div that I define in my page and I set height and width for div so I can change search engine textbox Width but it didn't change textbox Height
How I can change Height of search engine textbox