c一直說輸入的字串格式不正確

2021-07-01 02:06:51 字數 638 閱讀 3190

1樓:匿名使用者

delete table where +條件 若id獲取的值是正確的這段話是沒有語法錯誤的,給定值可以使用的話那就說明你的 request.querystring["id"]的確出現獲取值異常問題。

測試:if (request.querystring["id"]==null)

else

2樓:匿名使用者

你的request.querystring["id"]不是乙個數字,所以強制轉換報錯。

建議使用tryparse,試一下能不能轉int,如果不能轉,提示錯誤。

string s = request.querystring["id"];

int num = 0;

if(int.tryparse(s,ref num))else

3樓:匿名使用者

檢視一下 request.querystring["id"]是否有值,這個可能為null或者空字串哦

4樓:

請檢查一下request.querystring["id"] 是否為空或含有字母,這個東西必須為純數字

第二點應該和request.querystring()這個方法有關

C輸入字串,把其中的字母字元大小寫轉換一下

include include define swap a,b using namespace std int main if islower a i cout 輸入乙個字串,把其中的字母字元大小寫轉換一下 123456 78910 1112 13 include void main else 原 ...

c語言書上說格式字元s的功能是輸出字串

0 是字串輸入的時候,系統自動加上的結束符,如 char a 10 scanf s a 輸入123回車,則a 0 1 a 1 2 a 2 3 a 3 0 也可以手工輸入,如 char b 10 b 0 a b 1 b b 2 c b 3 0 0 也可以直接用0,如 char c 10 表示陣列c中全...

c語言鍵盤輸入字串刪除其中的母音字母

include stdafx.h if the vc 6.0,with this line.include stdio.h int main void 回答 include stdafx.h if the vc 6.0,with this line.include stdio.h int main ...