解决方案 »
- C# point[] 数组怎么能托管给intptr
- 关于存储过程返回值的问题
- 获取TREEVIEW节点的绝对路径。
- 如何用Shell函数调用
- winform中如何取得DataGrid當前單元格的位置?實在沒分了,幫幫忙,很急的!
- 向高手请教解压缩反序列化的问题
- System.Windows.Controls.DataGrid 在.net 3.5 下不可用?
- c#书籍!
- C#开发的Web程序在调试运行过程中,总出现“句柄未初始化”错误,出错的类文件DataAccess.cs全部源码如下:
- C#高级编程中的这个程序是否是错的?
- C#中如何实现撤消?
- 冰天雪地 裸体360度跪求 [ascx自定义控件的一个问题]
else
{
string URL = " <script>parent.location='LoadPage.apsx'; </script>";
return URL ;
//System.Web.HttpContext.Current.Response.Write(" <script>parent.location='LoadPage.apsx'; </script>"); } 你这个句子里面没有返回值
else
{
string URL = " <script>parent.location='LoadPage.apsx'; </script>";
return URL ;
//System.Web.HttpContext.Current.Response.Write(" <script>parent.location='LoadPage.apsx'; </script>"); }
return ...
public string cc(int a)
{
if (a == 4)
{
return null;
}
else
{
string URL = " <script>parent.location='LoadPage.apsx'; </script>";
return URL; }
}
你看我这个 和你的返回是差不多的吧 没有报错
建议在函数的开始处写一个返回变量,在函数的结尾返回它。
string returnValue;
.......
for (int i = 0; i < strTemp.Length; i++)
{
// 其实if这里可以省略了
if (strTemp[i] == UserUnit)
{
returnValue = null;
}
else
{
string URL = " <script>parent.location='LoadPage.apsx'; </script>";
returnValue = URL ;
}
}
return returnValue;