עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה עם date בasp.et

Featured Replies

פורסם

אני מנסה לעדכן תאריך והטופס כל הזמן קורס לי, זאת השגיאה שהוא רושם לי

[h=2]String was not recognized as a valid DateTime.[/h]זה הקוד:


Line 27: // string date = "2000-02-02";
Line 28: // string date = string.Format("'{0}'"+"-"+"02-02", Request.Form["year"].ToString());
[COLOR=red]Line 29: DateTime time = DateTime.Parse(date);
[/COLOR]Line 30: /* *************** check if person exists ***************/
Line 31: bool isExistence = person.isExistence(Request.Form["id"], comm);

חשוב לציין שאם אני מכניס ערך בצורה הזאת

[COLOR=#000000][FONT=Consolas]Line 27:                //  string date = "2000-02-02";[/FONT][/COLOR]

מוריד את התיעוד אז השאילתה עובדת והוא מעדכן לי את הטבלה בsql server.

אבל כאשר אני מנסה לשרשר את האלמנטים מהaspx הדף נופל, אני מנסה להעביר ערך של <select>

פורסם

תכניס את המחרוזת ישירות לבסיס הנתונים (דרך SSMS) ותראה מה הבעיה, אחר כך תתקן את הקוד.

פורסם
  • מחבר

הצלחתי כמעט לפתור את הבעיה, זה מה שעשיתי

:


Line 27: int mmm = int.Parse(Request.Form["month"]);
Line 28: string ss = Request.Form["year"].ToString();
[COLOR=red]Line 29: int y = Convert.ToInt32(ss);
[/COLOR]Line 30:
Line 31: DateTime DTime = new DateTime();

אם אני רושם במקום ה convert to int 32 אני רושם מספר למשל 1900 זה עובד

- - - תגובה אוחדה: - - -

אחרי שקראתי את הstring ss מסתבר שנגיד סימנתי בselect והערך של הoption הוא למשל 1900 אז שהוא מדפיס לי הוא מדפיס 1900,10 כל ערך של הoption הוא מוסיף לי בסוף 10,

פורסם
  • מחבר

וואי אני חייב לשתף אותכם במשהו הזוי :) יצרתי select חדש , פשוט העתקתי ויצרתי חדש עם שם אחר

והכל עובד פיקס

חחחח :) מוזר לגמרי!!

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.