在asp.net中window.showModalDialog弹出窗口,关闭之后怎么刷新主窗口

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在asp.net中window.showModalDialog弹出窗口,关闭之后怎么刷新主窗口相关的知识,希望对你有一定的参考价值。

不行啊 我试过的 他语句都执行咯 可是就是页面就是不刷新,这是什么问题啊

参考技术A 最好是让服务器控件,比如LinkButton来打开这个模态窗口,给LinkButton设个OnClientClick是打开的,然后关闭之后页面就会回传,不想让它回传就return false 参考技术B 在打开窗口语句下边写一句reload就可以了。

window.showModalDialog("...");
location.reload() ;

或者可以尝试转入本页

window.location.href = 'A.aspx ';本回答被提问者采纳
参考技术C location.reload() ;
重新加载一次就OK.

如何在 asp.net 中使用 ccavenue 支付网关

【中文标题】如何在 asp.net 中使用 ccavenue 支付网关【英文标题】:how to use ccavenue payment gateway in asp.net 【发布时间】:2014-03-12 05:26:24 【问题描述】:

我必须在 asp.net 中实现 ccavenue 支付网关。

我在互联网上搜索了很多,但找不到使用 asp.net 的单个工作示例。

我也尝试过来自站点的示例,但它没有记录且不正确。我不知道如何在 asp.net 中使用此服务。

【问题讨论】:

【参考方案1】:
    将 CCAvenue 发送到您的 Gac 的 Library 文件夹中的所有 dll 添加到您的 Gac 从 Avenue 集成工具包中,您将获得三个页面 - Data.aspx、SubmitData.aspx 和 ResponseHandler.aspx 在您的按钮上,您必须将您的 OrderID、MerchantID(由 CCAvenue 提供)、金额和重定向 URL(您的网站 URL,以便 ASA Payment 将用户重定向到您的站点)传递到 Data.aspx 页面。 初始化 Data.aspx 的 TextBox 根据点击结帐按钮后获得的值,如上图 3 所示。 在 SubmitData.aspx.cs 页面中,在 workingkey 变量上初始化您的工作密钥(登录到您的 CCAvenue 帐户后,您将获得您的工作密钥)。

执行此步骤后,您可以将 Avenue 网关集成到您的按钮

详情参考这里-

http://bhartiwebworld.blogspot.in/2013/09/how-to-do-ccavenue-payment-gateway.html

您还可以使用 magento 进行集成。对于 magento,请查看此视频 -

https://www.youtube.com/watch?v=4e1SiQM-sHA

【讨论】:

第一个链接已被删除。如果可能,请更新您的答案。谢谢【参考方案2】:

我已经解决了。是的,CCAvenue 提供了良好的支持。但是使用 asp.net 论坛的人总是会寻找 asp.net 代码和直接答案。 :)

我希望这会对某人有所帮助。我在后面的代码中创建了两个属性。一种是返回校验和值,另一种是返回有关结帐项目的详细信息。

在此处输入代码

public string CCAvenueItemList
 
     get
     
         StringBuilder CCAvenueItems = new StringBuilder();
         DataTable dt = new DataTable();
         DataTable dtClientInfo = new DataTable();
         dt = (DataTable)Session["CheckedItems"];
         dtClientInfo = (DataTable)Session["ClientInfo"];
         for (int i = 0; i <= dt.Rows.Count - 1; i++)
         

             string amountTemplate = "<input type=\"hidden\" name=\"Amount\" value=\"$Amount$\" />\n";
             string orderTemplate = "<input type=\"hidden\" name=\"Order_Id\" value=\"$Order_Id$\" />\n";

            // BILLING INFO
             string billingNameTemplate = "<input type=\"hidden\" name=\"billing_cust_name\" value=\"$billing_cust_name$\" />\n";
             string billingCustAddressTemplate = "<input type=\"hidden\" name=\"billing_cust_address\" value=\"$billing_cust_address$\" />\n";
             string billingCountryTemplate = "<input type=\"hidden\" name=\"billing_cust_country\" value=\"$billing_cust_country$\" />\n";
             string billingEmailTemplate = "<input type=\"hidden\" name=\"billing_cust_email\" value=\"$billing_cust_email$\" />\n";
             string billingTelTemplate = "<input type=\"hidden\" name=\"billing_cust_tel\" value=\"$billing_cust_tel$\" />\n";
             string billingStateTemplate = "<input type=\"hidden\" name=\"billing_cust_state\" value=\"$billing_cust_state$\" />\n";
             string billingCityTemplate = "<input type=\"hidden\" name=\"billing_cust_city\" value=\"$billing_cust_city$\" />\n";
             string billingZipTemplate = "<input type=\"hidden\" name=\"billing_zip_code\" value=\"$billing_zip_code$\" />\n";

            billingCustAddressTemplate = billingCustAddressTemplate.Replace("$billing_cust_address$", dtClientInfo.Rows[0]["Address"].ToString());
             billingCountryTemplate = billingCountryTemplate.Replace("$billing_cust_country$", dtClientInfo.Rows[0]["Country"].ToString());
             billingEmailTemplate = billingEmailTemplate.Replace("$billing_cust_email$", dtClientInfo.Rows[0]["Email_ID"].ToString());
             billingTelTemplate = billingTelTemplate.Replace("$billing_cust_tel$", dtClientInfo.Rows[0]["Phone_no"].ToString());
             billingStateTemplate = billingStateTemplate.Replace("$billing_cust_state$", dtClientInfo.Rows[0]["State"].ToString());
             billingCityTemplate = billingCityTemplate.Replace("$billing_cust_city$", dtClientInfo.Rows[0]["City"].ToString());
             billingZipTemplate = billingZipTemplate.Replace("$billing_zip_code$", dtClientInfo.Rows[0]["ZipCode"].ToString());

            strAmount = dt.Rows[i]["INR"].ToString();
             amountTemplate = amountTemplate.Replace("$Amount$", dt.Rows[i]["INR"].ToString());
             orderTemplate = orderTemplate.Replace("$Order_Id$", dt.Rows[i]["ClientID"].ToString());
             billingNameTemplate = billingNameTemplate.Replace("$billing_cust_name$", dtClientInfo.Rows[0]["Name"].ToString());

            CCAvenueItems.Append(amountTemplate)
                 .Append(orderTemplate)
                 .Append(billingNameTemplate)
                 .Append(billingCustAddressTemplate)
                 .Append(billingCountryTemplate)
                 .Append(billingEmailTemplate)
                 .Append(billingTelTemplate)
                 .Append(billingStateTemplate)
                 .Append(billingCityTemplate)
                 .Append(billingZipTemplate)
                 .Append(deliveryNameTemplate)
                 .Append(deliveryCustAddressTemplate)
                 .Append(deliveryCountryTemplate)
           
         return CCAvenueItems.ToString();
     
 


public string propcheckSum
 
     get 
         libfuncs objLib = new libfuncs();
         string strCheckSum = objLib.getchecksum("YourMerchantID", Session["ClientID"].ToString(), strAmount, "UrReturnUrl", "your working key");
         return strCheckSum;
     
 



<div>
     <%=CCAvenueItemList%>
     <input type="hidden" name="Merchant_Id" value="yourmerchantID" />
     <input type="hidden" name="Checksum" value="<%=propcheckSum%>" />
     <input type="hidden" name="Redirect_Url" value="YourWebsite'sThankyoupage.aspx" />
     <input type="submit" value="Submit" runat="server" />
 </div> 

【讨论】:

您只是在回复前 19 小时粘贴了我在 my answer 中链接的帖子。 :|【参考方案3】:

我必须在 asp.net 中实现 ccavenue 支付网关。

你确定你的意思是你需要实现这个吗?你的意思是你想整合它

官方文档

CC Avenue Documentation on page 12 讨论如何将 CCAvenue 与 ASP.Net 应用程序集成。

第 1.4 节(第 17 页)提供了一个 ASP.Net 示例,第 1.5 节(第 19 页)展示了如何对其进行测试。如果这些都不起作用,联系 CCAvenue 的集成支持听起来是个好主意。

文档在第 2 页也提到了

service@world.ccavenue.com

+91 22 26000816/846

+91 22 26491524

作为一项付费服务​​,他们倾向于为最终用户提供良好的技术支持,以帮助他们将网关与支持的语言(我所看到的 ASP.Net 就是其中之一)集成在一起。

使用 C Sharp 的 ASP.NET 示例

在 ASP.Net 论坛上的人们有一篇关于 CCAvenue integration using C# 的帖子和回复。希望对您有所帮助。

备用查询

关于您在集成的哪一部分遇到问题的更明确的问题会有所帮助。 赏金似乎正在寻找与上面链接的文档相关的官方/可信来源。想到以下问题:

    在尝试使用他们的样本时,您是否确保将测试身份验证密钥替换为真实密钥? 您的返回网址是否在 CCAvenue 网站上正确配置?

【讨论】:

以上是关于在asp.net中window.showModalDialog弹出窗口,关闭之后怎么刷新主窗口的主要内容,如果未能解决你的问题,请参考以下文章

在 Asp.net / Asp.net mvc 中进行实时 Web 体验的方法是啥? [关闭]

在asp.net中如何对一些数据进行分组

在 ASP .NET 5 中如何保护配置数据?

请问:ASP.net mvc5和asp.net.core有啥区别呢?在今后的发展中这个前景怎么样?

在 ASP.NET 应用程序中使用扩展 - .NET 6

如何在 asp.net 中使用 ccavenue 支付网关