Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
162 views
in Technique[技术] by (71.8m points)

c# - Url parameter getting removed after pasting in browser

I have a web application built using asp.net core. I am displaying multiple product list on a page and when I click on a product, new page opens up. This page has url with parameter as encrypted product id. If I copy and paste this url in some other window or give it to the customer to view the product details, for the fist time the encrypted id is removed automatically. If I click on reload then the actual product detail page opens up.

So, for example if the url is

https://betafront.fusionaccess.com/CatalogueDetail/Decor/indian-headgear-napkin-rings/EAAAAD01hTStb6SHVNCYRAqwbV9H_4qh9X5Ev27rjMwFCKjO

and if customer tries to open this by copy pasting then the url automatically becomes

https://betafront.fusionaccess.com/CatalogueDetail/Decor/indian-headgear-napkin-rings

here is the code to generate url

  <a href="/CatalogueDetail/@ViewBag.CatType/@item.ProdName.ToLower().Replace(" ", "-").Trim()/@Protectornew.EncryptOnlyValue(item.ProdId.ToString())" data-prodname="@item.ProdName" data-prodId="@item.ProdId" class="viewProducts">

What could be the issue?

Ps: I don't know which code could be useful for someone to help me. Please let me know if you need to see some other part of my code.

question from:https://stackoverflow.com/questions/65882730/url-parameter-getting-removed-after-pasting-in-browser

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...