使用Windows应用程序将用户名和密码发送到URL [英] Send Username and password using Windows application to URL
问题描述
嗨开发者,
如何使用Windows应用程序(C#)将用户名和密码发送到特定的URL.Below是URL。
网址: https://secure.tmhp.com/TexMedConnect/ [ ^ ]
In这个链接有一个POP up正在打开弹出ID我也无法跟踪。请帮我如何将用户名和密码发送到这个URL ..
感谢提前...
问候,
Aravind G
在Windows应用程序中访问URL是这样的
首先启动一个启动Internet Explorer的过程,如
System.Diagnostics.Process.Start(IExplore,通过你的网址);
通过URL传递参数,例如
string url = http :// localhost / reportserver?/ +
AdventureWorks2012示例报告/ +
公司销售& rs:Command = Render;
总代码看起来像
private void viewReportButton_Click( object sender,System.EventArgs e )
{
// 根据用户提供的值构建URL访问字符串
string url = serverUrlTextBox.Text + ? + reportPathTextBox.Text +
& rs:Command = Render + & rs:Format = HTML4.0;
// 如果用户未选中工具栏复选框,
// 在HTML查看器中关闭工具栏
if (toolbarCheckBox.Checked == false )
url + = & rc:Toolbar = False;
// 在Web浏览器中加载报告
try
{
System.Diagnostics.Process.Start( IExplore,url);
}
catch (例外)
{
MessageBox.Show(
系统无法使用Internet Explorer打开指定的报告。,
发生错误,MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
Hi Developers,
How to send username and password using windows application (C#) to particular URL.Below is the URL.
URL: https://secure.tmhp.com/TexMedConnect/[^]
In this link one POP up is opening for that pop up ID's also i am unable to track.Please help me how to send user name and password to this URL..
Thanks for advance...
Regards,
Aravind G
to Access URL in your windows application is some like this
first start a process to initiate the internet explorer like
System.Diagnostics.Process.Start("IExplore", "Pass your URL");
passing Parameters through URL like
string url = "http://localhost/reportserver?/" + "AdventureWorks2012 Sample Reports/" + "Company Sales&rs:Command=Render";
Total Code looks like
private void viewReportButton_Click(object sender, System.EventArgs e) { // Build the URL access string based on values supplied by a user string url = serverUrlTextBox.Text + "?" + reportPathTextBox.Text + "&rs:Command=Render" + "&rs:Format=HTML4.0"; // If the user does not check the toolbar check box, // turn the toolbar off in the HTML Viewer if (toolbarCheckBox.Checked == false) url += "&rc:Toolbar=False"; // load report in the Web browser try { System.Diagnostics.Process.Start("IExplore", url); } catch (Exception) { MessageBox.Show( "The system could not open the specified report using Internet Explorer.", "An error has occurred", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
这篇关于使用Windows应用程序将用户名和密码发送到URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!