جدیدترین سوالات

در قسمت 9 ویدیو یاد داده شد که چگونه دو تا ایتم به سبد خرید اضافه کنیم با این کد ها

  protected void AddToShoppingCart_Click(object sender, EventArgs e)
 
{

Button btn = (Button)sender;
if (Session["shoppingCart"]!= null)
{
Session["shoppingCart"] += "," + btn.ToolTip;
}
else
{
Session.Add("shoppingCart", btn.ToolTip);

}

// Response.Redirect("shoppingCart.aspx");
}


و این کد
protected void Page_Load(object sender, EventArgs e) { if (Session["status"] != null && Session["status"].ToString() == "Login") { //successful login sql_addedProds.SelectCommand = "SELECT * FROM [Products] WHERE ([id] in (" + Session["shoppingCart"].ToString() + "))"; } else { Response.Redirect("login.aspx"); } }
ولی وقتی دو ایتم یه سبد اضافه می کنم این ارور را می دهد
Server Error in '/' Application.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14286670
System.Number.ParseInt32(String s, Num
{
if (Session["status"] != null &&
Session["status"].ToString() == "Login")
{


//successful login
sql_addedProds.SelectCommand = "SELECT * FROM [Products] WHERE ([id] in ("
+ Session["shoppingCart"].ToString() + "))";


}
else
{
Response.Redirect("login.aspx");
}




جستجو در بانک سوالات
در این قسمت می توانید بخشی از متن سوال را وارد نموده و به دنبال سوال مورد نظر خود بگردید:

بخشی از متن سوال:

بهترین فروشگاه ساز چیست؟

سلام به دوستان و اساتید محترم
قصد دارم یک فروشگاه اینترنتی راه اندازی کنم .به نظر شما بهترین فروشگاه ساز اینترنتی چیست؟
الویتهای من برای یک فروشگاه خوب به این صورته:
1.سئوی بالا
2.قابلیت مقایسه چند کالای همنوع مثل چند موبایل
3.پنل مدیریتی اسان اما با امکانات بالا(چون مطالعات برنامه نویسی ندارم و فقط تا حدودی با جوملا و وردپرس اشنایی دارم)
ضمن اینکه مدت کوتاهی در محیط لوکال با جوملا و وردپرس کار کردم و به این نتیجه رسیدم که کار با وردپرس راحتتره اما از یکی دو نفر پرسیدم گفتن جوملا بهتر و گسترده تره.بعضی از دوستان هم پرستا شاپ یا برخی فروشگاه سازهای ایرانی رو بهم پیشنهاد کردن.کاملا گیج و سر در گم شدم.لطفا بی طرف و بدون تبلیغات اظهار نظر کنید تا این حقیر از اطلاعات و تجربیاتتون استفاده ببره.
با تشکر فراوان



0
امتیاز

جواب های موجود برای این سوال:


ازین پس می توانید به کاربرانی که دوست دارید هدیه بدهید! کافیست بر روی علامت    در کنار تصویر آنها کلیک کنید!

2


جواب برای این سوال ثبت شده است!

تازه ترین


جواب ها رو اول نشون بده

پرامتیاز ترین


جواب ها رو اول نشون بده

2 جواب برای این سوال ثبت شده!

چینش بر اساس زمان ثبت


چینش بر اساس امتیاز



36363
10495
116471

Guest

پرستا شاپ کار کن، 1 سال که از روش بگذره تازه می فهمی چیه. ما رو هم دعا می کنی.مطمئن باش
0
امتیاز


0
9
30

Terminal

درود بر شما

در مورد فروشگاه خدمتتون عرض کنم که تومیتو شاپ (Tomato Card) ، اُپن کارت ( Open Card) خوب هستند
ولی مقایسه بین محصولات ندارند، باید پیگیر بشید ببینید شاید پلاگینی چیزی واسش نوشته شده باشه

در مورد سیستم مدیریت محتوا به اختصار CMS (Content Managment System) خدمتتون عارض بشم که هر کدام کارایی خاص خودشون رو دارند . به عنوان مثال وردپرس بیشتر برای سایت های خبری ، پروفایل (Portfolio) ، خوب هست ولی در کامل بودنش شکی نیست ، که البته دارای مدیریتی بسیار روان (روان منظور این نیست که پیشرفته نیست) داره.
جوملا سیستم مدیریت بسیار گسترده و وسیعی داره که برای سایت های شرکتی پیشنهاد میشه

موفق باشید...
0
امتیاز




جواب تو چیه؟
userImage
کاربر میهمان















سلام و عرض ادب

و بنده هم تمامی کدها و پاسخ هایی که مربوط بوده اند را تست و مطالعه کرده‌ام اما واقعا با اینکه مساله ساده است، برای قالب کتاب ما که در زی پرشین است، خروجی مد نظر تولید نمیشود. نه تنها برای قالب کتاب ما، بلکه برای حتی برای قالب زی پرشینی که در اکثر قالب پایان نامه ها و کتب استفاده می‌شود وجود داشت نیز جواب نداد.

خروجی که میخواهم، خیلی ساده با زبان کد به شرح زیر است:
\fancyhead[LO,RE]{\thepage}
\fancyhead[LE]{کتاب جبرخطی}
\fancyhead[RO]{\leftmark}

خروجی مد نظر به زبان فارسی به شرح زیر است:
صفحات زوج بالا سمت راست شماره‌ی آن صفحه‌ی زوج درج شود
صفحات زوج بالا سمت چپ متن دلخواه سلام دنیا درج شود
صفحات فرد بالا سمت راست عنوان فصل درج شود
صفحات فرد بالا سمت چپ شماره‌ی آن صفحه‌ی فرد درج شود.

لازم به ذکر است که پکیج های پیشنیاز نیز اد می کنم و هدر های قبلی را نیر با دستور \fancyhf{} حذف می کنم، اما باز هم خروجی مطلوب را نمی دهد.
نتیجه گرفته‌ام که انگار کامپایلر فرقی بین صفحات زوج و فرد قایل نمی‌شود.

کدهای کتاب خدمت اساتید گرانقدر ضمیمه شدند.

پیشاپیش از پاسخگویی شما سپاسگزارم
 
 
\documentclass [
a4paper,
fleqn,% type of the paper...
11pt, % set the size of the main font in the document...
oneside % sides of the paper...
] {report} % for longer reports containing several chapters, small books, thesis...




% this is for prime in mathematic formulas...
\newcommand* {\everymodeprime} {
\ensuremath {\prime}
}

% this part is for code styling inside document...
\usepackage {fancyvrb}
\DefineVerbatimEnvironment {code} {Verbatim} {fontsize = \small}
\DefineVerbatimEnvironment {example} {Verbatim} {fontsize = \small}

% make the meta information for the pdf file...
\usepackage [
pdfauthor = {rrrr},
pdftitle = {Linear Algebra Book},
pdfsubject = {Book},
pdfkeywords = {LA},
breaklinks = true
] {hyperref}

% mathematic package...
\usepackage[fleqn]{amsmath}

%%%%




%\fancyhead[RE]{\text{کتاب فیزیک}}
%\fancyhead[LO]{\thepage}
%\fancyhead[LE]{\leftmark}
%\fancyhead[RO]{\text{کتاب جبر}}
%%%%




% Set the left margin for equations
\setlength{\mathindent}{0em} % You can adjust the length as needed


\usepackage{regexpatch}

% Redefine double dollar to use \[ ... \]
%\def\[#1\]{\begin{equation*}#1\end{equation*}}

% Redefine $$ to use \[ ... \]


% Patch the $$ command to use fleqn
%\pretocmd{\[}{\begin{equation}}{}{}
% \apptocmd{\]}{\end{equation}}{}{}

% define color for table...
\usepackage [table] {xcolor}
\definecolor {gray} {rgb} {.4, .4, .4}

% to import images...
\usepackage {graphicx}
\usepackage{subfigure}
% \usepackage {etoolbox}

% make all the images centre in horizontal alignment...
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother

% package for changing headings style...
\usepackage {fancyhdr}

% setting the margins of page...
\usepackage [
top = 5.1cm,
right = 4.5cm,
bottom = 5.1cm,
left = 4.5cm
] {geometry}

% multiline comments...
\usepackage {comment}

% force figure placement in text...
\usepackage {float}

% add multi-row property to tables...
\usepackage {multirow}


































% remove ugly borders around clickable hyperlinks...
\hypersetup {hidelinks}

% add references in table of contents...
\usepackage [
nottoc,
notlot,
notlof
] {tocbibind}

% pushes the footnote to the bottom of the page...
\usepackage [bottom] {footmisc}




\usepackage{sectsty} % For section font customizations

% Replace dots with dashes in equation numbers
\renewcommand{\theequation}{\arabic{section}-\arabic{equation}}







% بسته‌ای برای ظاهر شدن «مراجع» و «نمایه» در فهرست مطالب
\usepackage[nottoc]{tocbibind}
% دستورات مربوط به ایجاد نمایه
\usepackage{makeidx}
\makeindex
%%%%
\usepackage{amssymb}
%%%%
\usepackage{amsthm}
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\usepackage{paralist}
%%%%
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{caption}



%%%%

% Replace dots with dashes in section numbering


%%%%

%%%%
%تعریف و نحوه ظاهر شدن عنوان قضیه‌ها، تعریف‌ها، مثال‌ها و ...
\renewcommand{\proofname}{\textbf{برهان.}}
\theoremstyle{definition}
\renewcommand{\proofname}{\textbf{برهان.}}
\newtheorem{definition}{تعریف}[section]
\newtheorem{theorem}{قضیه}[section]
\renewcommand{\proofname}{\textbf{برهان.}}
\newtheorem{lemma}{لم}[section]
\newtheorem{proposition}{گزاره}[section]
\newtheorem{corollary}{نتیجه}[section]
\newtheorem{remark}{ملاحظه}[section]
\newtheorem{hypo}{فرضیه}[section]
\newtheorem{prob}{مساله}[section]
\newtheorem{exx}{مثال}[section]
\newtheorem{point}{نکته}[section]
\newtheorem{notice}{توجه}[section]
\renewcommand{\proofname}{\textbf{برهان.}}



% import the xepersian package...
\usepackage{xepersian}
\usepackage{fontspec}
\usepackage{fancyhdr}
\usepackage{lipsum}


%%%%


\usepackage{supertabular}
\usepackage{fancyhdr}
\usepackage{lipsum} % For generating dummy text




%%%%


\usepackage{perpage}
\MakePerPage{footnote} % Reset footnotes on each page
% Reset footnotes at the start of each chapter




%\newfontfamily\STITRBD{STITRBD}

% set the default font family and font size...
\settextfont [Scale = 1.1] {BNazanin}
%\setdigitfont [Scale = 1.1] {B Yas}

\setlatintextfont [Scale = 1.05] {Times New Roman}

% root directory for images...
\graphicspath {{images/}}

% make the normal pages header...
%\pagestyle {fancy}
% page number at the left side of header...
%\lhead {\thepage}
% chapter title at the right side of header...
%\rhead {\leftmark}

\usepackage{zwpagelayout}

%%%%
%%%%



%%%%

%%%%
\pagestyle{fancy}
\fancyhf{} % Clear all headers and footers
\lhead {\thepage}
\fancyhead[R]{\leftmark} % Page number at the top right
\renewcommand{\headrulewidth}{0.4pt} % Add a header rule

Define a new page style for Farsi pages without the bottom page number
\fancypagestyle{farsi-no-bottom-page-number}{%
\fancyhf{} % Clear all headers and footers
\renewcommand{\headrulewidth}{0.4pt} % Add a header rule
\fancyhead[R]{\leftmark} % Page number at the top right
}
%%%%


\usepackage{fancyhdr}






%\defpersianfont\STITRBD{STITRBD}
%





%%%% Replace dots with dashes in equation numbers%%%%
\usepackage{sectsty} % پکیج دستی سازی تنظیمات نحوه ارجاع دهی فرمول ها و متن
\usepackage{glossaries}
\makeglossaries

%\usepackage{titlesec}

%تعریف محیط جدید جهت جایگزینی - با . در ارجاع دهی فرمول ها
\renewcommand{\theequation}{\arabic{section}-\arabic{equation}}



%تعریف محیط جدید جهت جایگزینی - بجای . در شماره گذاری تایتل‌ها
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\thechapter-\arabic{section}}
\renewcommand{\thesubsection}{\thesection-\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection-\arabic{subsubsection}}
% {\chaptertitlename\ \thechapter}{26pt}{\Huge}

%%%%
%تغییر فونت و سایزعناوین و شمارنده ها و ...:



\usepackage{fontspec}

\newfontfamily{\btitr}{BTitrBold}

\newcommand\YUGE{\fontsize{48}{60}\selectfont}
\newcommand\LLLL{\fontsize{26}{60}\selectfont}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont
\ifnum \c@secnumdepth >\m@ne
\YUGE\bfseries\btitr\@chapapp\space \thechapter
\par\nobreak
\vskip 40\p@
\fi
\interlinepenalty\@M
\LLLL \bfseries\btitr #1\par\nobreak
\vskip 30\p@
}}
\makeatother





%%%%



%%%%



% override the references section title name...
\renewcommand\bibname {فهرست مراجع}












% some constant variables...
\input {TeX/constants}
% input the cover information for persian cover...
\input {TeX/fa/cover_info}
% input the cover information for english cover...
\input {TeX/en/cover_info}
% input symbols used in the thesis...
\input {TeX/symbols}
% some helper functions...
\input {TeX/functions}

% define line height...
\linespread {1.35}



%%
%\usepackage{titlesec} % For section title customizations
%\titleformat{\chapter}[display]
%{\normalfont\huge\bfseries\bfseries\TitrB} % Change the font to Dashaq
%{\LARGE\thechapter}{1em}{\Huge}

%\usepackage{scrlayer-scrpage}

% Replace dashes with dots in section numbering
%\titleformat{\section}
%{\normalfont\Large\bfseries}{\thesection.}{1em}{}
%\renewcommand{\thesection}{\arabic{section} -}

% Set the Persian numeral for section numbering

% Set the Persian numeral for section numbering


% begin the document...
\begin {document}



%\fancyhead[RE]{\text{کتاب فیزیک}}
%\fancyhead[LO]{\thepage}
%\fancyhead[LE]{\leftmark}
%\fancyhead[RO]{\text{کتاب جبر}}
% the cover page...
% \include {TeX/fa/cover}

% submission page...
% \include {TeX/fa/submission}

% evaluation page...
% \include {TeX/fa/evaluation}

% acknowledgements page...
% \include {TeX/fa/acknowledgements}


% alphabetic page numbering for non-report pages...
\pagenumbering {alph}



% the abstract page...
\include {TeX/fa/abstract}


% table of content...
\tableofcontents
\newpage
% group the list of figures, list of tables and table of contents in one page...
\begingroup
\let\clearpage\relax
% list of figures...
% \listoffigures
% list of tables...
% \listoftables
\endgroup

% begin the arabic page numbering from now on...
\pagenumbering {arabic}




\renewcommand{\headrulewidth}{0.4pt} % Add header rule




%

% the report body...
\include {TeX/body/1-introduction}
\include {TeX/body/2-related_works}
\include {TeX/body/3-proposed_method}
\include {TeX/body/4-evaluation}
\include {TeX/body/5-conclusion}
\include {TeX/body/6-innerProduct}
\include {TeX/body/7-AppsInnerproduct}
\include {TeX/body/8-EigenVectorsEigenValues}
\include {TeX/body/9-AppsOfEigenVectorsEigenValues}
\include {TeX/body/10-SingularValuesDecompodition}
% \include {TeX/body/7-conclusion}
\include {TeX/body/10-2-Attachment}

% \include {TeX/body/6-references}
\bibliography{ref.bib}
\bibliographystyle{unsrt-fa}
% appendixes section...
\begin {latin}
% english abstract page...
\include {TeX/en/abstract}

% english cover page...
\include {TeX/en/cover}
\end {latin}
\include {TeX/body/11a-Dictionary}
\include {TeX/body/11-Dictionary}
\include {TeX/body/12-DictionaryFatoEn}
\end {document}







پرسش سوال جدید :: تبلیغات در سوال و جواب :: گروه های سوال و جوابی

تمامی حقوق مادی و معنوی، متعلق به وب سایت سوال جواب (soja.ai) و تیم مدیریتی آن می باشد.

طراحی و اجرا : گروه مشاوران فناوری اطلاعات

پاسخ های موجود در سایت توسط کاربران سایت ثبت می شود،
سایت سوال و جواب هیچ مسئولیتی در قبال صحت و محتوی پاسخ ها ندارد، هرچند تا حد امکان نظارت بر محتوی آنها صورت می گیرد.