For the life of me, I can't figure out what the problem is with this:
tempData= from a in dx.SomeTable select a; string searchField="ItemName"; string searchString="BoxPkg"; object[] parameters=new object[]{searchField,searchString}; tempData = tempData.Where("@0 like @1", parameters);
I get this error " {"Expression of type 'Boolean' expected"} "
I'm having issues when trying to run my web app. I'm getting an expression expected error at runtime on the portion of my code that is designed to retain the screen position of multiple drag panels.
Code: var target = $this).attr("id");
should return the id of the uniquely named panel so it can be used later in code to identify the _DragPanelExtender.BehaviorID
I haven't been able to verify if the dragPanel's id name is being used, it just errors out here. In the following code, I am attempting to preserve the position of multiple dragPanel's after postback? Code: function pageLoad() {
//get element id name of button clicked var target = $(this).attr("id"); // call the savePanelPosition when the panel is moved $find(target).add_move(savePanelPosition); var elem = $get("<%=HiddenField1.ClientID%>");
I'm using the CustomValidation Function to call my javascript but for some reason I'm not getting the * to indicate the error to the user. I keep getting a Function expected Error, so what is wrong with my javascript that's causing this error and why aren't I receiving the * notification?
Javascript:
<script type="text/javascript" language="javascript"> function checkAGITotal() { var a = document.getElementById('<%= NumberInHouseholdTxtbox.clientid %>').value; var b = document.getElementById('<%= AGITotalTxtbox.clientid %>').value; if (a == "1" && b <= "27247" || a == "2" && b <= "35630" || a == "3" && b <= "44014" || a == "4" && b <= "52397" || a == "5" && b <= "60781" || + a == "6" && b <= "69164" || a == "7" && b <= "70736" || a == "8" && b <= "74020" || a == "9" && b <= "81500" || a == "10" && b <= "88980" || + a == "11" && b <= "96460" || a == "12" && b <= "103940") return true; else return false; } </script> vb.net code: Total: $<asp:TextBox ID="AGITotalTxtbox" runat="server" Width="116px"></asp:TextBox> <asp:CustomValidator ID="AGITotalValidator" runat="server" ControlToValidate="AGITotalTxtbox" ErrorMessage="Your household income exceeds the maximum allowed." ClientValidationFunction="checkAGITotal()" SetFocusOnError="True">*</asp:CustomValidator>
i am trying to retrieve data from sql database but I get this error: < An expression of non-boolean type specified in a context where a condition is expected, near ')'. > whats this error meaning?
I have a datalist and would like to add an if statement within the Text part of my label.
Tried the following but it doesn't work
Note: if I do a normal eval Text='<%# Eval("UI_successful_trans")%>' the value returned from the database will be 1 or 0. Depending of which value is returned, I would like to have the text "Win" or "Lose" returned. ( I know that this could easily be done in code behind but I would like to know if it is
The issue I am facing is that the current page URL is getting appended to the 'LinkAddress'(the URL being fetched from the database) and thus,the final URL formed is not a valid one.Can someone suggest how do I remove the current page URL? Is there any way it can be done without writing code in the code behind page?
I have a SQL which is running good at SQL Server Mgm studio:
"select d.EmployeeID, CONVERT(VARCHAR(10),d.LogTime,111) as Date1, MIN(CONVERT(VARCHAR(8), d.LogTime, 108)) as FirstIn from LogTable d where d.dwStatus=0 group by d.EmployeeID, CONVERT(VARCHAR(10), d.LogTime,111)"
However, When i put it into my code (Entity SQL):
"select d.EmployeeID, CONVERT(VARCHAR(10),d.LogTime,111) as Date1, MIN(CONVERT(VARCHAR(8), d.LogTime, 108)) as FirstIn from IGPSiteEntities.AccessLogSet AS d where d.dwStatus=0 group by d.EmployeeID, CONVERT(VARCHAR(10), d.LogTime,111)"
I got error :
'CONVERT' cannot be resolved into a valid type of function. Near simple identifier, line1, column 200.
LogTime is a DateTime format e.g 05/05/2010 14:12:12
I want to select ONLY the Date (e.g 05/05/2010) and select ONLY the time (e.g 14:12:12) so i use CONVERT function.
I have a datalist menu that has several menuitems in it(each item load user control).I want to show each menuitems in seperate dynamic Ajax tabs when I click on first item tab is created but when I click on second menuitem to create second dynamicajax tab I faced this error:
I am new to jquery in asp.net mvc2 and was trying to implment a simple jquery function like a show() function on my system but it keeps giving me this error:
ERROR : Server Error in '/behtop website' Application. Year, Month, and Day parameters describe an un-representable DateTime.
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.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
Source Error:Â Line 231: DateTime miladi = Convert.ToDateTime(miladi1); Line 232: System.Globalization.PersianCalendar shamsi = new System.Globalization.PersianCalendar(); Line 233: DateTime shamsidate = new DateTime(shamsi.GetYear(miladi), shamsi.GetMonth(miladi), shamsi.GetDayOfMonth(miladi)); Line 234: //DateTime shamsidate = new DateTime(shamsi.GetYear(miladi), shamsi.GetMonth(miladi), shamsi.GetDayOfMonth(miladi), shamsi); Line 235: