在reg页面中获取激活电子邮件中的错误 [英] Getting error in activation email in reg page

查看:100
本文介绍了在reg页面中获取激活电子邮件中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误.....





im getting error in .....


private string Fetchsno(string emailid)
{

}







错误:'_Default。 Fetchsno(string)':并非所有代码路径都返回一个值





我想使用这个功能激活网址.....

假设我使用了无数据类型的手段,



我在激活网址中出错...






Error: '_Default.Fetchsno(string)': not all code paths return a value


I want to use this funtion activation url.....
suppose if i have used void datatype means,

im getting error in activation url...

ActivationUrl = Server.HtmlEncode("http://localhost:50059/WebSite1/activate%20account.aspx?sno=" + Fetchsno(emailid) + "&emailid=" + emailid);







错误:




error:

Error   16  Operator '+' cannot be applied to operands of type 'string' and 'void'  D:\frm lap\WebSite1\Default.aspx.cs 33  44  D:\frm lap\WebSite1\







给我你的建议




Give me your suggestions

推荐答案

你忘了用你的函数返回一个字符串。



You forgot to return from your function with a string.

private string Fetchsno(string emailid)
{
    return "Here you can add your string.";
}


这篇关于在reg页面中获取激活电子邮件中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆