Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/445.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Lightswitch:具有字符串和整数搜索属性的参数(可能吗?)_Javascript_Visual Studio Lightswitch_Lightswitch 2013 - Fatal编程技术网

Javascript Lightswitch:具有字符串和整数搜索属性的参数(可能吗?)

Javascript Lightswitch:具有字符串和整数搜索属性的参数(可能吗?),javascript,visual-studio-lightswitch,lightswitch-2013,Javascript,Visual Studio Lightswitch,Lightswitch 2013,只是Visual Studio 2013 Lightswitch HTML客户端中的一个快速问题,是否可以根据查询设置参数字段以允许搜索sting和Integer值 例如StaffID(int)和StaffName(string) 干杯伙计们当然-如果Javascript没有隐式地进行转换,那么在搜索查询参数中显示int时只需添加一个.ToString() e、 g 将其添加到提交搜索的按钮的执行事件中。如果要尝试像我在这里构建的那样的串联搜索字符串,请确保使用“Contains”操作符 sea

只是Visual Studio 2013 Lightswitch HTML客户端中的一个快速问题,是否可以根据查询设置参数字段以允许搜索sting和Integer值

例如StaffID(int)和StaffName(string)


干杯伙计们

当然-如果Javascript没有隐式地进行转换,那么在搜索查询参数中显示int时只需添加一个.ToString()

e、 g

将其添加到提交搜索的按钮的执行事件中。如果要尝试像我在这里构建的那样的串联搜索字符串,请确保使用“Contains”操作符

searchString = intField.ToString() + ((intField==null)?" ";"") 
                  + strField.ToString() + ((strField==null)?" ";"")
                  + datefield.ToString()