C# 如何将值存储到asp.net c中的a href链接多个值

C# 如何将值存储到asp.net c中的a href链接多个值,c#,asp.net,C#,Asp.net,我想将许多值存储到此链接,以便以这种方式将值传递到aspx页面。如何增加值的数量 htmlBody = string.Format(" Hi "+userName+ "\n Thank you for creating an account with RSS MANAGEMENT SYSTEM \n </ br>" + "Please click the below link to activate your account <br />" + "<a hre

我想将许多值存储到此链接,以便以这种方式将值传递到aspx页面。如何增加值的数量

htmlBody = string.Format(" Hi "+userName+ 
"\n Thank you for creating an account with RSS MANAGEMENT SYSTEM \n </ br>" + 
"Please click the below link to activate your account <br />" + 
"<a href='http://localhost:2386/ActivateUser.aspx?userName{0}&Id={1}'>Activate {0} </a>",
UName, user_name);
你的意思是这样的:

var someothervalue=1:
string.format("<a href='http://localhost:2386/ActivateUser.aspx?userName{0}&Id={1}'>Activate {0} </a>{2}", 
UName, user_name,someothervalue)
像这样的

var values = new Dictionary<string,string>{ 
                                                {"username", user_name},
                                                {"id", UName},
                                                {"otherparam", "lalala"}
                                         };

var queryString = string.Join("&" + values.Select(x => x.Key + "=" + x.Value));

var link = string.format("<a href='http://localhost:2386/ActivateUser.aspx?{0}'>Activate {1} </a>", queryString, user_name);

我不明白你的问题。您是否在问如何增加格式字符串中要替换的令牌数量?如何从aspx端获取它?获取它是什么意思?在ActivateUser.aspx中?例如,Request.QueryString[username]