|
Hi,
if I understood you right the problem is, that the parameter you pass is null for the second method. Maybe there is a problem with filling the SOAP-request for the second method. Check the wsdl of your service, how the request must look like (especially the parameter) and then try to use a tcp-monitor to check if your delphi application puts the passed string in the correct field of the request.
I'm just guessing, so I hope this helps you a bit.
Regards
Sebastian
|
|
|
|
|
Hey I am receiving 3 errors in this code, I am using 2008 web developer with C#, any help would be greatly appreciated. I want to see other peoples' opinions before I display my own for an unbiased opinion. Thanks
Errors: (...this.txtSearch.Text; )
(...GetIDSimple(entry...)
(...this.lblresults.text)
_____________________________________________________
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Google.GData.Client;
using Google.GData.Extensions;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string url = "http://gdata.youtube.com/feeds/videos?q=" + this.txtSearch.Text;
AtomFeed myFeed = GetFeed(url, 1, 15);
DisplayFeed(myFeed);
}
private static AtomFeed GetFeed(string url, int start, int number)
{
System.Diagnostics.Trace.Write("Conectando youtube at " + url);
FeedQuery query = new FeedQuery("");
Service service = new Service("youtube", "exampleCo");
query.Uri = new Uri(url);
query.StartIndex = start;
query.NumberToRetrieve = number;
AtomFeed myFeed = service.Query(query);
return myFeed;
}
private void DisplayFeed(AtomFeed myFeed)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (AtomEntry entry in myFeed.Entries)
{
#region render each
sb.Append("<br /><b>Title:</b> ");
sb.Append(entry.Title.Text);
sb.Append("<br /><b>Categories:</b> ");
foreach (AtomCategory cat in entry.Categories)
{
sb.Append(cat.Term);
sb.Append(",");
}
sb.Append(RenderVideoEmbedded(getIDSimple(entry.Id.AbsoluteUri)));
sb.Append("<br /><b>Published on:</b> ");
sb.Append(entry.Published);
#endregion
}
this.lblResults.Text = sb.ToString();
}
private string RenderVideoEmbedded(string idSimple)
{
return string.Format("<div id=\"video{0}\"><object width=\"425\" height=\"355\"><param name=\"movie\" value=\"http://www.youtube.com/v/{0}&rel=1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/{0}&rel=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"355\"></embed></object></div>", idSimple);
}
}
|
|
|
|
|
Aehm, well and the errors are? What kind of errors do you get? Compiler, runtime? Maybe the textbox and the label are not declared. Same with the getIDSimple-method.
|
|
|
|
|
haha well they were ---> are you missing a using directive or an assembly reference? and not in current context
but I knew I had all needed references/dll in my bin
I found out at work later in the day why, I should slap myself
they all started with lower case, I had uppercase
(I have another problem I am posting soon, maybe I can get some help with this one)
|
|
|
|
|
Well, if you want any help you need to post the error messages and where they occur. Have you tried the simple solution of stepping through in debug?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I found out at work later in the day why, I should slap myself
they all started with lower case, I had uppercase
(I have another problem I am posting soon, maybe I can get some help with this one)
|
|
|
|
|
hi,
plz tell me how can i modify the url from
xyz.com/page.xyz
to
xyz.com/page.html
I want to make sure that whenever a url is hitted with some page.<anything> it should be rewritten as page.html.
PS: I am using plain html files.
Thanks
Aditya
|
|
|
|
|
Well I'm sure you can do this:
Since you're using plain html files then when you save the file, in your example the save name would be 'page' ( resulting in xyz.com/PAGE.xyz )
Do This--> save the file as 'page.html' and upload to your ftp. It should come up on the browser as xyz.com/page.html
Example:
say the website is www.google.com
and the file name is 'probe'
normally it would show www.google.com/probe.xyz
(the .xyz is whatever you type the file in such as a simple .txt if using notepad)
just save that same file as 'probe.html' and upload to your ftp and it should come out as
www.google.com/probe.html
It's as simple as that if I understood correctly
|
|
|
|
|
Hey thanks for the reply,
however i think there is miscommunication.
Let me explain this issue to you -
I have my pages all ending with ".htm" so the default file is default.htm
However, i want to make sure, even if somebody hits "default.html" it should not go to 404 page instead it should be redirected to default.htm page. so the page wont appear broken for simple 'l' in the .html.
so i want to rewrite URLs ending with .html to end with .htm
I hope i am clear enough this time.
Thanks again,
Aditya
|
|
|
|
|
ok, Well in that case the only way I know how to solve such an issue
is to create a file called default.html and have it auto redirect to default.htm
that way whenever a user types either name both goes to default.htm
|
|
|
|
|
thank you...
well actually it was not just for one page.. i wanted it for whole site.. i have heard of the mod rewrite.. but i am not sure about the regular expression and the syntax that needs to be there for rewriting the URLs automatically for any page within the site.
Anyway thanks for your efforts!!!
cheers,
Aditya
|
|
|
|
|
HI...
I am developing in asp.net with mysql database.
Someway or the other I am unable to connect to database, and gives me the error..as follows
"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I am using Vista operating system
I also installed odbc connector version 3.51 for mysql , but getting same error message..
Please guide me to resolve the problem....
Thanks.
Hemant thaker
By:
Hemant Thaker
|
|
|
|
|
Hi,
can you connect to the database by using the "Test"-button on the ODBC-Administration form?
Regards
Sebastian
P.S.: Maybe you could post the code you are using to connect to the db.
|
|
|
|
|
hi...
thanks ....
It's a web application in asp.net and using mysql with that..
The thing is that i am able run the application in different machine there I get the connection.
And its not working in other system where all the modules are installed like mysql connector 3.51 and all that.
is there any problem relating to port ????
By:
Hemant Thaker
|
|
|
|
|
Give us some code, and the connection strings. Then we might be able to help, as of right now, there are about a million reasons as to why this isn't working.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
plz, help
I need a Javascript for Hijri calendar.
|
|
|
|
|
|
Hi all,
we are calling a swf inside a asp.net page(.aspx), when I click the print button(in flash) it's not detecting the printer, it shows the message Detecting Printer...., but nothing happens. But if i call the same page inside a html page it's working fine. There is some reason to call the swf inside the aspx page.
I am not a flash action script programmer, am a .Net developer, the developer who done this work not here now. They askd me to fix this.
Suggest me how to fix this.
Thank you all.
Know is Drop, Unknown is Ocean
|
|
|
|
|
I am not sure either, but since it is working on the html page, you could IFrame it on a simple html page, set the border to 0 and you won't even know it is there.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi..
I have one gridview and displaying records on that. When the pagging indexes appear and i click on next index i get the following error
The GridView 'grdPosts' fired event PageIndexChanging which wasn't handled
could u tell me how to handle this problem....
By:
Hemant Thaker
|
|
|
|
|
You need to have some code that handles the grid view PageIndexChanging event, much like the error says. Google for it...
|
|
|
|
|
Here is a simple question for everyone but me.
The purpose of this code is to send a feedback message to me, the webmaster.
The visual basic code is written on a code behind page for the page which has the blanks to fill in to send the webmaster feedback.
The code sends the message. However, it's ina loop. The Protected Sub Button1_click procedure starts, it does the SendMail procedure with no trouble, Does the end sub and then goes back to its beginning of Protected Sub Button1_click to send the message again. How do I get out of this loop?
Thank you for your help.
Imports System.Web.UI
Imports System
Imports System.Net
Imports System.Net.Mail
Imports System.Web.TraceContext
Partial Class Feedback
Inherits Page
Protected Sub Button1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SenderName As String = TxtName.Text
Dim SendersEmail As String = TxtEmail.Text
Dim Subject As String = TextSubject.Text
Dim Message As String = TxtMessage.Text
SendMail(SenderName, SendersEmail, Subject, Message)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Sub SendMail(ByVal SenderName As String, ByVal SendersEmail As String, ByVal Subject As String, ByVal Message As String)
|
|
|
|
|
There's no loop in the code you posted. What does the sendmail function do?
|
|
|
|
|
Ok, there is no loop in the code in the Basic programing technical sense. On the other hand why, after doing the End Sub of the Protected Sub Button1_click, does it go back to the first statement of the Protected Sub Button1_click procedure and proceed to do it all over again?
Here is a copy of the entire code behind page Page/History.aspx.vb. When I step through, statement by statement, it jumps over the Catch statements and does Finally and its statements and then End Try and then End Sub and then jumps to Protected Sub Button1_click, does the Dims and starts the Send Mail all over again.
I use ASP 3.5, Visual Web Developer Express 2008. The four Dims are there so I could be sure I picked up the four variables from the Display page. Once I know things are working correctly,
Much thanks for your help.
Imports System.Web.UI
Imports System
Imports System.Net
Imports System.Net.Mail
Imports System.Web.TraceContext
Partial Class Feedback
Inherits Page
Protected Sub Button1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SenderName As String = TxtName.Text
Dim SendersEmail As String = TxtEmail.Text
Dim Subject As String = TextSubject.Text
Dim Message As String = TxtMessage.Text
SendMail(SenderName, SendersEmail, Subject, Message)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Sub SendMail(ByVal SenderName As String, ByVal SendersEmail As String, ByVal Subject As String, ByVal Message As String)
Dim NetMail As New MailMessage
Dim MailClient As New SmtpClient
Dim ThisHost As String = "MAILSERVER"
Dim ThisPort As Integer = 25
Dim TheseCredentials As New NetworkCredential("USERNAME", "PASSWORD")
' Dim ThisSender As String = "SENDERNAME <RECIPIENTMAIL>"
Dim ThisSender As String = SenderName
' Dim ThisRecipient As String = "RECIPEINT MAIL <RECIPIENTMAIL>"
Dim ThisRecipient As String = "mhh112@hotmail.com"
' Dim ThisSilentRecipient As String = String.Empty
Try
' NetMail.From = New MailAddress(ThisRecipient)
NetMail.ReplyTo = New MailAddress(ThisRecipient)
NetMail.To.Add(New MailAddress(ThisRecipient))
' If Not ThisSilentRecipient = "" Then
' NetMail.Bcc.Add(New MailAddress(ThisSilentRecipient))
' End If
NetMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
NetMail.IsBodyHtml = False
NetMail.Priority = MailPriority.Normal
' NetMail.Subject = "Test Subject" & DateTime.Now.ToLongTimeString()
NetMail.Subject = Subject & " " & DateTime.Now.ToLongTimeString()
' NetMail.Body = "Test Body " & DateTime.Now.ToLongTimeString()
NetMail.Body = DateTime.Now.ToLongTimeString() & " " & Message
MailClient.DeliveryMethod = SmtpDeliveryMethod.Network
' MailClient.Host = ThisHost
MailClient.Port = ThisPort
MailClient.UseDefaultCredentials = False
MailClient.Credentials = TheseCredentials
MailClient.Send(NetMail)
Catch EXC As Exception
Trace.Warn(EXC.Message)
Finally
NetMail.Dispose()
NetMail = Nothing
MailClient = Nothing
End Try
End Sub
Protected Sub TxtName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
End Class
|
|
|
|
|
You don't, by any chance, have an onclick="" defined for the button in the aspx page, as well as the handles statement in the code behind?
|
|
|
|