|
This seems like exactly what I've been needing. I tried to do something very similar with Javascript, but was held back with security restrictions between frames and pages. I didn't realize C# and ASP.NET could work with the web page elements like this. I'll try this out as soon as I can. Thank you very much for the help!
|
|
|
|
|
If you're going through the trouble of creating a Windows App you might as well use WebRequest/WebReponse objects, no need to implement a web browser.
only two letters away from being an asset
|
|
|
|
|
I haven't really found anything in WebRequest/WebResponse that would let me simulate entering data in a text box. I find a lot of information about sending POST data and HTTP headers, but the things I find don't seem to apply because I am trying to send information through a SSL secured webpage (such as Gmail, or any sort of similar login system).
|
|
|
|
|
You don't need to enter anything in the textbox. One of the properties of WebRequest is Credentials, supply the proper crendentials here and post your data.
only two letters away from being an asset
|
|
|
|
|
I tried using this but couldn't get it to work. I'll try again, more extensively, using my gmail account to test, but this doesn't make sense to me on a conceptual level. How would the Credentials property of Webrequest know how to interface with the Gmail login, or the Yahoo login, or any specific login. Doesn't the login system rely heavily on implementation?
|
|
|
|
|
Think about it a little more. When you fill in a login form and click the submit button what is happening? A request is made to the server to validate the crendtials provided in the textboxes. The texboxes themselves are not sent.
only two letters away from being an asset
|
|
|
|
|
Here's what happens in my mind: I enter the username and password, click submit, the following is sent to their servers (encrypted):
POST /login.jsp HTTP/1.1
Host: www.mysite.com
User-Agent: Mozilla/4.0
Content-Length: 27
Content-Type: application/x-www-form-urlencoded
userid=joe&password=mypassword
From there, they work their magic on the userid and password to authenticate the user, and send a reply to the client that says A'Okay.
What I am getting help up on is what I am sending from my client to the server. I know that only the text is sent, not the actual text boxes, but what if Gmail needs the data in the format:
userid=joe&password=mypassword
while Yahoo needs:
USERNAME=joe&PASSCODE=mypassword
If that's the case, how does ASP.NET know what format to send the data in for different pages?
|
|
|
|
|
Hi,
I try to dynamically build URL to navigate:
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# BuildURLAdding() %>' >Add new </asp:HyperLink>
which uses function in my codebehind file:
protected string BuildURLAdding()
{
return @"~/PROTECTED/Annotations/AnnotationsList.aspx?ClientID=" + Request.Params["IDClient"];
}
But this is invalid (the link is un-clickable, which means that the 'NavigateUrl' was wrongly specified). Where could be a mistake?
I checked the page directive and there is everything ok:
<%@ Page Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true"
Codebehind="AnnotationsList.aspx.cs" Inherits="Mercedes.PROTECTED.Annotations.AnnotationsList"
Title="Untitled Page" %>
Thank you very much in advance
-- modified at 14:30 Monday 21st May, 2007
|
|
|
|
|
How do you specify the NavigateUrl?
If you paste markup code, use the "Ignore HTML" option.
---
single minded; short sighted; long gone;
|
|
|
|
|
You need to resolve the url, not use "~". I assume the BuildURLAdding method is used to assign the NavigateURL property?
only two letters away from being an asset
|
|
|
|
|
I`m terribly sorry - my message wasn`t correctly posted. I have modified it already, this is correct form:
Hi,
I try to dynamically build URL to navigate:
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# BuildURLAdding() %>' >Add new </asp:HyperLink>
which uses function in my codebehind file:
protected string BuildURLAdding()
{
return @"~/PROTECTED/Annotations/AnnotationsList.aspx?ClientID=" + Request.Params["IDClient"];
}
But this is invalid (the link is un-clickable, which means that the 'NavigateUrl' was wrongly specified). Where could be a mistake?
I checked the page directive and there is everything ok:
<%@ Page Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true"
Codebehind="AnnotationsList.aspx.cs" Inherits="Mercedes.PROTECTED.Annotations.AnnotationsList"
Title="Untitled Page" %>
Thank you very much in advance
|
|
|
|
|
|
I`m affraid that this is not the problem here. First of all, I have a working example with '~' in front of address. Second of all - I deleted this from my example and it still doesn`t work.
Any more suggestions?
|
|
|
|
|
Are you referring to this MasterPageFile="~/SiteMaster.Master" as your example.
If so it is an apples to oranges comparison, they are not the same thing. The tilda is resolved via the control.ResolveURL method. You are manually providing the url string which does not go through this method.
only two letters away from being an asset
|
|
|
|
|
I don`t understand everything you wrote, but even if I try with that method in my .cs file:
protected string BuildURLAdding()
{
string s = "www.onet.pl";
return s;
}
the hiperlink still remains invisible
|
|
|
|
|
Perhaps I missed it at the begining, you are using
<%# BuildURL() %>
which a databinding expression. Have you tried using <% =BuildURL() %>
only two letters away from being an asset
|
|
|
|
|
I tried using
<% =BuildURL() %> and <% BuildURL() %>
the effect is different - I can now see the link and even click it, but after clicking I`m getting:
HTTP Error 400 - Bad Request. - I believe the navigateUrl is not being set correctly
I`m coping here the working example that I`m having:
<asp:HyperLink ID="Link1" runat="server" NavigateUrl='<%# BuildURLForCustomer(Eval("ID"), Eval("Moves")) %>'>
protected string BuildURLForCustomer(object ob1, object ob2)
{
string pageName = "~/Cars/CarsList.aspx";
return string.Format("{0}?id={1}", ob1, ob2);
}
|
|
|
|
|
It is very interesting, why this example doesn`t work in my current project. I took it from other project where it worked...
Nevertheless, I can of course set these NagivateUrls in Load(..) method, but it`s still very interesting why this doesn`t work
|
|
|
|
|
Hello!
I set in Web Developer the CultureInvariant tag to True and still my application refuses to accept doubles with a '.' instead of a ',' Do I overlook something?
Ranger.
Novice
|
|
|
|
|
I have an updatepanel with a little animation in it and I want to trigger this when the user clicks the button in the loign control.
But everytime I add a trigger of LoginControl - OnLoggingIn it throws this error the first time the site is run (after a service start or a long period)
Sys.WebForms.PageRequestManagerParserErrorException: The message recived from the server could not be parsed. Common causes for this error are the response is modified by calls to Response.Write(), reponse filters, HttpModules, or server trace is enabled.
Details: Error parsing near '_WS/SE/Welcome.aspx|<html>
<head>
'.
Anyone know why this is? Or how to help?
|
|
|
|
|
I believe this has to do with the fact that there are a number of controls that simply cannot be used with UpdatePanel control
The following ASP.NET controls are not compatible with partial-page updates, and are therefore not supported inside an UpdatePanel control:
*
TreeView and Menu controls.
*
Web Parts controls. For more information, see ASP.NET Web Parts Controls.
*
FileUpload controls when they are used to upload files as part of an asynchronous postback.
*
GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.
*
Login, PasswordRecovery, ChangePassword, and CreateUserWizard controls whose contents have not been converted to editable templates.
*
The Substitution control.
*
Validation controls, which includes the BaseCompareValidator, BaseValidator, CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, and ValidationSummary control.
See this for details
|
|
|
|
|
Hi
Does anyone know how to draw graphs in ASP using office tools.
Thanks in advance
|
|
|
|
|
You use Visio tools that will be very easy to draw all the graphs and other images.
Regards,
Satips.
|
|
|
|
|
Hi
Is it possible to use Visio tools from ASP . . .If so please let me know how to do that . . .
|
|
|
|
|
Hi all,
I have some queries
I have put one check box in grid.
as
<asp:templatefield headertext="Select">
<itemstyle horizontalalign="Center" width="50px">
<headerstyle width="70px" cssclass="heading">
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server" cssclass="text" oncheckedchanged="Check_Clicked">
On click of this check box in the grid some event will fire
Which event is that
Can anybody tell
Thanks in advance
|
|
|
|