C# force response.Redirect()在编译时显示断开URL的错误

C# force response.Redirect()在编译时显示断开URL的错误,c#,asp.net,C#,Asp.net,如果调用response.Redirect()时URL不可用,Visual studio编译器是否可能显示错误?否。由于可用URL的完整集在运行时才知道,并且完全是动态的,因此无法在编译/编辑时进行预测

如果调用response.Redirect()时URL不可用,Visual studio编译器是否可能显示错误?

否。由于可用URL的完整集在运行时才知道,并且完全是动态的,因此无法在编译/编辑时进行预测