Is there a standard way to create a unique web page address in ASP.NET? I send polls to clients and include a link to a web page. For instance:
http://www.mysurveypages.foo/survey/UniqueID
Then I set up the survey based on who I sent it to. I know that this can be done by passing a unique parameter to the page, but I'm wondering how to do it.
You can use Routing to map the structure of your URL to a specific page and collection of parameters. Essentially, this allows you to convert parts of the URL into URL parameters for your page. This works in standard WebForms and is the basis on which MVC selects the appropriate controller / action signature to invoke.
Yup like dcp said GUID is a smart solution http://mywebsite.com/survey.aspx?ID=GUID
http://mywebsite.com/survey.aspx?ID=GUID
, .
List<User> users = GetSurveyUsers(); foreach(User u in users) { Guid guid = Guid.NewGuid(); //Then store the user-guid pair into DB or XML... }
, , UniqueID , . , Guid, - - , .
ASP.Net MVC, Url ( , ) , , . , , Url, , Url .
The GUID approach is safe if you can save it somewhere. If not, you can use some existing unique data (for example, customer ID or email address) either directly (but be careful with leakage of confidential data) or hash (but conflicts must be considered).
Source: https://habr.com/ru/post/1750344/More articles:Dynamic Information Database Tables - database-designHow can I get a “Delay” for a process that has a TCP connection? - c #Как я могу создать БД, где пользователь может определить поля и типы таблицы подробностей в отношениях M-D? - sqlHow to check the status of network devices in C? - cHow to effectively get results from Octree / Quadtree? - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1750345/add-widgets-to-custom-wordpress-sidebars-on-theme-activation&usg=ALkJrhhV4GXY2tuKopcauLSpPqP1249x5gCan I open the url from android android wallpaper? - androidNoClassDefFoundError for a packaged class - javaWPF Underline the letter in a tag element - wpf-controlsSession Regeneration - phpAll Articles