<% dim con dim recset dim ssql dim vartopcat dim cat1 dim cat2 dim cat3 'Paging----------------------------- Dim Page Dim RowCount Dim PageCounter Dim Currpage, pageLen, lastNumber, PageRem, PageTen Dim next10, prev10, P Dim RSPrevPage, RSNextPage, start If IsEmpty(Request.Querystring("PageNo")) then CurrPage = 1 Else CurrPage = Cint(Request.Querystring("PageNo")) End If 'the two functions below return the next 10 and prev 10 page number Function getNext10(num) pageLen = len(num) If pageLen = 1 Then next10 = 10 Else If pageLen>1 Then pageRem = 10 pageTen = right(num, 1) next10 = num + pageRem - pageTen End If End If getNext10 = next10 End Function Function getPrev10(num) pageLen = len(num) If pageLen = 1 then prev10 = 1 Else If pageLen>1 then lastNumber = right(num, 1) prev10 = num - lastNumber - 10 End If End If If prev10 = 0 then prev10 = 1 End If getPrev10 = prev10 End Function '---------------------------------- if request.form("btnGo")<>"" or Request.Querystring("PageNo")<>"" then set con=Server.CreateObject("ADODB.Connection") set recset=Server.CreateObject("ADODB.Recordset") recset.CursorLocation = 3 con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("MyDatabase.mdb") con.Open ssql="" if request.form("btnGo")="Go" then ssql="select * from TabReceipeMast where TopCategory='" & Request("cboTopCategory") & "' and Category1='" & Request("cboCategory1") & "' and Category2='" & Request("cboCategory2") & "' and Category3='" & Request("cboCategory3") & "'" vartopcat=Request.form("cboTopCategory") cat1=Request("cboCategory1") cat2=Request("cboCategory2") cat3=Request("cboCategory3") end if if Request.Querystring("PageNo")<>"" then ssql="" ssql="select * from TabReceipeMast where TopCategory='" & Request.querystring("TopCategory") & "' and Category1='" & Request.querystring("Category1") & "' and Category2='" & Request.querystring("Category2") & "' and Category3='" & Request.querystring("Category3") & "'" vartopcat=Request.querystring("TopCategory") cat1=Request.querystring("Category1") cat2=Request.querystring("Category2") cat3=Request.querystring("Category3") end if recset.Open ssql,con,0,1 'recset.AbsolutePage=cInt(Page) if recset.eof then response.write"Record not Found...." response.end else recset.PageSize=2 recset.AbsolutePage = CurrPage end if end if %> Food, Cooking and Recipes, Hotels, Hotel Management Institutes, Cooking Ware Suppliers & Manufactures, Indian Cuisine, Photo Gallery,Hospitality Books, Cooking Basics, Dictionaries & Glossaries, Wine & Drinks, Restaurants, Indian Hotels, HM Institutes, Manufactures & Suppliers, Study Material, Alumni

FEATURED LINK

Recipe Index

Indian Cuisine

Photo Gallery

Hospitality Books

Cooking Basics

Dictionaries & Glossaries

Wine & Drinks

Restaurants

Indian Hotels

HM Institutes

Manufactures & Suppliers

Study Material

Alumni

RECIPES CATEGORIES

Appetizers

Beverages

Breakfast and Brunch

Cafeteria Line

Delightful Desserts and Baked Goods

Healthy Eating

Main Course

Side Dishes

NEWSLETTER

Get the latest in the world of culinary! Enter your e-mail to sign up for our newsletter.


Recipes

Categories

<% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then next10 = getNext10(CurrPage) prev10 = getPrev10(CurrPage) 'while recset.eof=false and RowCount CurrPage OR recset.Eof %> <% response.flush recset.MoveNext Loop 'recset.movenext 'RowCount=RowCount+1 'wend %> <%else%> <%end if%><%end if%>

<% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then %> <% myarr1=split(recset.fields("IngredientName"),vbCrlf) for i=0 to ubound(myarr1)-1 mysubarr=split(myarr1(i),"~") 'Response.write myarr1(i) & "    " & "Name:" & mysubarr(0) & ",Quantity:" & mysubarr(1) & "
" varingr=mysubarr(0) varingqty=mysubarr(1) %> <% next myarr1="" end if end if %>

<% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then response.write recset.fields("RecipeName") end if end if %>

<% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then response.write recset.fields("Title") end if end if %>

Serves: <% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then response.write recset.fields("Serves") end if end if %>

Cooking time: <% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then response.write recset.fields("CookingTime") end if end if %>minutes

Ingredients

Quantity
 <%=i+1%>.<%=varingr%>  <%=varingqty%>

Method

  <% if request.form("btnGo")<>"" or request.querystring("PageNo")<>"" then if recset.eof=false then response.write recset.fields("Method") end if end if %>

Page : <% 'the next 2 lines setup the page number for the "previous" and "next" links RSPrevPage = CurrPage -1 RSNextPage = CurrPage + 1 'find out the number of pages returned in the recordset 'if the Next10 page number is greater than the recordset page count 'then set Next10 to the recordset pagecount If Next10 > recset.PageCount Then Next10 = recset.PageCount End If 'the variable start determines where to start the page number navigation ' i.e. 1, 10, 20, 30 and so on. If prev10 = 1 AND next10 - 1 < 10 Then start = 1 Else start = Next10 - 10 If right(start, 1) > 0 Then start = replace(start, right(start, 1), "0") start = start + 10 End If End If 'This checks to make sure that there is more than one page of results If recset.PageCount > 1 Then 'Work out whether to show the Previous 10 '<<' If next10 > 10 Then response.write("<< ") End If 'Work out whether to show the Previous link '<' If NOT RSPrevPage = 0 then response.write("Prev ") End If 'Loop through the page number navigation using P as our loopcounter variable For P = start to Next10 If NOT P = CurrPage then response.write("" & P & "  ") Else 'Don't hyperlink the current page number response.write(" " & P & " ") End If Next 'this does the same as the "previous" link, but for the "next" link If NOT RSNextPage > recset.PageCount Then response.write("Next ") End If 'Work out whether to show the Next 10 '>>' If NOT Next10 = recset.PageCount Then response.write(" >>") End If End If ' Close the recordset and connection object recset.Close Set recset= Nothing con.Close Set con=Nothing %>

Record Not Found! Try Again

 

2006 Cookery India Terms Privacy policy Advertise with us
BEST VIEW IN 800X600 
Site Requirements :
Internet Explorer 5.5+ or Netscape 5.0+, Flash Player 5.0 & Real Player 8 Basic

Designed & Developed  By :-Splash Design Studio, Jaipur