解决方案 »
- 生成xml的问题
- 各位大神帮忙看看,急!
- asp(不是asp.net)中能不能用.net组件,要怎么用呢?
- 求Rational.XDE.v2003.Developer.Plus.NET.Edition下载地址,不要bt或电驴的,因为公司和家里下不了
- 写过自定义控件的XDJM们进来看看~~~~~~~~~~~~~~(在线等,急)
- asp.net页缓存
- winform工具條的問題
- .Net1.1下的Forms身份验证在系统升级到2003SP2后无法登录,哪位老大指点迷津
- 关于wencontrol的问题,谢谢
- 报表错误
- 百度ueditor编辑器部署ASP网站错误:百度编辑器ueditor部署服务器,浏览网页用户无法上传文件。
- 奇怪的导航条问题
你的问题也一定不是问题。
一个网站不能同时显示俩个页面啊。除非你用iframe之类的。那样可以添加个类嘛。
A页面的时候赋值(如果只是单纯的前端,不管是ajax还是其他方法,一定可以传给后台的嘛)
B页面取一下。跟session差不多吧。
前端在“页面”上执行什么东西的时候,在asp.net端已经不存在页面。因此需要明确说明这个“传给后台”的具体概念、机制、流程,而不是“asp.net页面”。否则就会越说越乱。
decimal USD = 0;
decimal EUR = 0;
decimal MYR = 0;
decimal IND = 0;
WebResponse webResponse = WebRequest.Create("https://uniservices1.uobgroup.com/secure/online_rates/foreign_exchange_rates_against_singapore_dollar.jsp?s_pid=HOME201205_eg_quicklnk_ql7").GetResponse();
StreamReader streamReader = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312"));
string content = streamReader.ReadToEnd();
MatchCollection matches = Regex.Matches(content, @"(?is)(?<=<td[^>]*?>).*?(?=</td>)");
foreach (Match match in matches)
{
if (match.Value == "USD")
USD = SafeValue.ChinaRound((SafeValue.SafeDecimal(match.NextMatch().NextMatch().NextMatch().Value, 0) + SafeValue.SafeDecimal(match.NextMatch().NextMatch().NextMatch().NextMatch().Value, 0)) / 2, 4);
if (match.Value == "EUR")
EUR = SafeValue.ChinaRound((SafeValue.SafeDecimal(match.NextMatch().NextMatch().NextMatch().Value, 0) + SafeValue.SafeDecimal(match.NextMatch().NextMatch().NextMatch().NextMatch().Value, 0)) / 2, 4); } webResponse = WebRequest.Create("https://secure.mas.gov.sg/msb/ExchangeRatesFeed.aspx?currency=myr").GetResponse();
streamReader = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312"));
content = streamReader.ReadToEnd();
matches = Regex.Matches(content, @"(?is)(?<=<title[^>]*?>).*?(?=</title>)");
MYR = SafeValue.SafeDecimal(SafeValue.SafeDecimal(matches[1].Value.Substring(5, 5), 0) / 100, 0); webResponse = WebRequest.Create("https://secure.mas.gov.sg/msb/ExchangeRatesFeed.aspx?currency=ind").GetResponse();
streamReader = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312"));
content = streamReader.ReadToEnd();
matches = Regex.Matches(content, @"(?is)(?<=<title[^>]*?>).*?(?=</title>)");
IND = SafeValue.SafeDecimal(SafeValue.SafeDecimal(matches[1].Value.Substring(5, 5), 0) / 100, 0); string sql = "update XXCurrency set CurrencyExRate='{0}' where CurrencyId='{1}'";
if (USD != 0)
C2.Manager.ORManager.ExecuteCommand(string.Format(sql, USD, "USD"));
if (EUR != 0)
C2.Manager.ORManager.ExecuteCommand(string.Format(sql, EUR, "EUR"));
if (MYR != 0)
C2.Manager.ORManager.ExecuteCommand(string.Format(sql, MYR, "MYR"));
if (IND != 0)
C2.Manager.ORManager.ExecuteCommand(string.Format(sql, IND, "INR"));