frontpage extension

Page 1 of 10 123 ... LastLast
Results 1 to 10 of 93

Thread: frontpage extension

  1. #1
    Dexter Holiday Guest

    Default if search results = 1 redirect to that page

    how do i do this?<BR>If only one result comes up in the search i want to redirect to that page, as opposed to showing the results for only one match.<BR>heres my code, is it close? by the way, go easy, i&#039m an apprentice geek...<BR><BR>&#060;% <BR>sSearch = Request.QueryString("q") <BR>images = "/images/"<BR>Counter = 0<BR><BR>set conn = Server.CreateObject("ADODB.Connection")<BR>conn.op en "monkey"<BR><BR>Set cArtist = conn.Execute("select * from Artist WHERE ArtistName LIKE &#039%" & sSearch & "%&#039 ORDER BY ArtistName")<BR><BR>do while not cArtist.eof<BR>cArtist.movenext<BR>Counter = Counter + 1<BR>Loop<BR><BR>If Counter = "1" then<BR>Response.Write (Counter)<BR>else<BR>%&#062;<BR><BR>&#060;%do while not cArtist.eof%&#062;<BR>&#060;b&#062;&#060;a class="link" href="/artist/default.asp?id=&#060;%=cArtist("ArtistID")%&#062;" &#062;<BR>&#060;%=cArtist("ArtistName")%&#062;&#06 0;/a&#062;&#060;/b&#062;<BR><BR>&#060;%=(Mid(cArtist("ArtistBio"),1 ,130))%&#062;...&#060;p&#062;<BR>&#060;%=counter%& #062;<BR>&#060;%cArtist.movenext<BR>Loop%&#062;<BR ><BR><BR>&#060;%end if%&#062;

  2. #2
    Vipul Desai Guest

    Default Simple Question: Virutal Directory

    I know what a physical directory is, but can someone please tell me what a virtual directory is.<BR><BR>Thanks,<BR><BR>Vipul<BR><BR>

  3. #3
    Rob Guest

    Default Correct me if I'm wrong - error trapping

    I want a second opinion on this theory.<BR><BR>I am registering users in a database. If I try to enter a user who is already there, I get an error that I am trying to overwrite the primary key. Normally, I parse the database <BR>looking for dulicates but wouldn&#039t it be iser just to trap this error? <BR><BR>if(err.number) = 0 Then<BR>response.write("You have already registered")<BR>Else<BR>set rs = adoDB.execute(SQL)<BR>End If<BR><BR>Thanks,<BR><BR>Rob

  4. #4
    Join Date
    Dec 1969
    Posts
    73

    Default Newbie - Renaming image files

    Im working on an ASP page that allows users to upload their own images. <BR>To prevent users from entering images with the same name, I want the ASP page to append a digit to the file name (eg image.jpg to image1.jpg) so that all file names will be unique. <BR>Ive got the names saved into the database with no problems by implementing a loop where count is appended on the file name<BR>count = 0<BR>mcount = 1<BR>do while mcount &#060;=20 &#039max 20 images<BR>count = count + 1<BR><BR> and replacing ".jpg" with <BR> count & ".jpg" <BR>The questions is, how do the same on the actual file name so that images will be viewable? <BR>thanks<BR>Susanna


  5. #5
    Join Date
    Dec 1969
    Posts
    98

    Default Response.Redirect

    How can I use the Response.Redirect page to log someone into my web site as a guest user?<BR><BR>Basically when you type in my url I would like that page to automatically log everyone in as a guest and then direct them to another page (but the user doesn&#039t see anything happening)<BR><BR>Is this possible? If so, I would love some help on getting it to work.<BR><BR>Thanks alot<BR><BR>Caroline

  6. #6
    Join Date
    Dec 1969
    Posts
    1,013

    Default Filtering a text string

    I am writing a message board using ASP and a SQL database. The folks I&#039m writing the board for want to be able to filter out profanity. I&#039ve come up with 2 possible solutions. One is to make a parser using the Dictionary object. This seems to be very slow so it&#039s not feasible. The other is to make an array of all the various profanity words and search one line at a time using a loop and InStr. I haven&#039t tried this yet so I thought I&#039d ask to see if any else has already done this so I don&#039t have to do all this experimenting. <BR><BR>Does anyone know where I could find some filtering code that already exist and is free?<BR><BR>Thanks.<BR><BR>Chris

  7. #7
    Manoj Guest

    Default XML

    Hi there <BR><BR>Can someone suggest me some good links for XML ?<BR><BR>TIA<BR>Manoj

  8. #8
    Join Date
    Dec 1969
    Posts
    196

    Default Controt.dll

    Anyone know where i can get this file from ?? Its for content rotator ....

  9. #9
    Join Date
    Dec 1969
    Posts
    717

    Default Need help with my loop

    &#039 Grab all the records<BR>do while not rs.eof %&#062;<BR><BR> &#060;% for i = 0 to count %&#062;<BR><BR> &#060;applet code = "test.class" width = 100 height = 45&#062; <BR> <BR> &#060; param name = appname value = "&#060;%=rs("app_name")%&#062;" &#062;<BR> <BR> &#060;/applet&#062;<BR> <BR> <BR> &#060;% next %&#062;<BR> &#060;%<BR> rs.movenext<BR>loop<BR>%&#062;<BR><BR><BR>I&#039m passing a string as parameter using the applet tag and the param tag. I enclosed the string that I&#039m passing in quotes.<BR>I get the parameter in the applet&#039s init method and I use the parameter to draw the name using the paint method.<BR>For some reason, the parameter I pass gets drawn twice. I don&#039t think it&#039s java drawing it twice since I make only one call to paint. I think It&#039s my loop calling the complied class twice.<BR><BR>Please help!

  10. #10
    PINKI Guest

    Default ticker

    HOW CAN I MAKE TICKER WITH ASP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •