私は自分のウェブページ上でページングを使用しているので、私が押すたびにその文字で始まるレコードが表示されます。しかし、私の問題は、#1、#323、_、!などで始まるレコードが含まれるように、文字以外のすべてを表示するために#を使用する必要があるということです。正規表現を使ってsay-古典的なASPのヒンジテーブル
if left(selectedRecord, 1) <> "[^a-z]" then
私はこれを行うには、ストアの手順を使用するために使用されるが、私はちょうどすべてのレコードを引っ張ると、このようにフィルタリングページングするときのチェックボックスが問題となっているので -
response.Write "<tr"
if trim(request.Form("selected_Button")) = "#" then
elseif trim(request.Form("selected_Button")) <> lcase(trim(left(objRS("Movies"), 1))) and len(request.Form("selected_Button")) = 1 then
response.Write " style=""display:none;"""
end if
response.Write ">"
だから私の質問は、私が解決する方法をあります#私のストアドプロシージャで使用した# -
select * from Movies where movies like '[^a-z]%'
個の
ページングボタン -
<center><input id="buttonStyle" type="submit" name="Selected_Button" value="#">
<% for i = 97 to 122 %>
<input id="buttonStyle" type="submit" name="Selected_Button" value="<%=CHR(i) %>">
<% next %></center>
<center></br><input id="buttonStyle" type="submit" name="Selected_Button" value="View All"></center>
EDIT:
だから私は解決策を自分で見つかりましたが、私はアルファベットをループせずにこれを行うことができるかどうかを知りたい -
response.Write "<tr"
if trim(request.Form("selected_Button")) = "#" then
for i = 97 to 122
if lcase(trim(left(objRS("Movies"), 1))) = chr(i) then
response.Write " style=""display:none;"""
end if
next
elseif trim(request.Form("selected_Button")) <> lcase(trim(left(objRS("Movies"), 1))) and len(request.Form("selected_Button")) = 1 then
response.Write " style=""display:none;"""
end if
response.Write ">"