<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>ASP Message Board</title>
		<link>http://www.aspmessageboard.com/</link>
		<description>This is a discussion forum powered by vBulletin. To find out about vBulletin, go to http://www.vbulletin.com/ .</description>
		<language>en</language>
		<lastBuildDate>Tue, 18 Jun 2013 23:48:39 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.aspmessageboard.com/images/misc/rss.png</url>
			<title>ASP Message Board</title>
			<link>http://www.aspmessageboard.com/</link>
		</image>
		<item>
			<title>Fancy recordset layout?</title>
			<link>http://www.aspmessageboard.com/showthread.php?237621-Fancy-recordset-layout&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 20:09:04 GMT</pubDate>
			<description><![CDATA[Hi Guys 
 
I have a table (sqlserver) with a field called "towns" and in this field I have approx 400 town records listed. 
 
I want to display my...]]></description>
			<content:encoded><![CDATA[<div>Hi Guys<br />
<br />
I have a table (sqlserver) with a field called &quot;towns&quot; and in this field I have approx 400 town records listed.<br />
<br />
I want to display my full list of town on my asp page but instead of listing them vertically or in standard table/cell/row format, I would love to lay the results out like this website:<br />
<br />
<a rel="nofollow" href="http://www.carbuyingadvisor.co.uk/review/find-reviews-by-town.aspx" target="_blank">http://www.carbuyingadvisor.co.uk/re...s-by-town.aspx</a><br />
<br />
As you can see somehow this guy has listed his towns alphabetically and also under an associated letter of the alphabet.<br />
<br />
Is this ease to achieve? My first thought was that he has 26 different queries running on the page? Can this be so? If not, how on earth is this done via an on-page sql statement?<br />
<br />
Any help would be fully appreciated<br />
<br />
Best regards<br />
<br />
Rod from the UK</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?4-ASP">ASP</category>
			<dc:creator>rjoseph</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237621-Fancy-recordset-layout</guid>
		</item>
		<item>
			<title>I am having all kinds of problems with this</title>
			<link>http://www.aspmessageboard.com/showthread.php?237619-I-am-having-all-kinds-of-problems-with-this&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 03:12:45 GMT</pubDate>
			<description><![CDATA[Hi again Experts, 
 
This issue is really, really driving me nuts. 
 
Please take a look at code below: 
 
Code: 
--------- 
s = "INSERT INTO...]]></description>
			<content:encoded><![CDATA[<div>Hi again Experts,<br />
<br />
This issue is really, really driving me nuts.<br />
<br />
Please take a look at code below:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">s = &quot;INSERT INTO tblTrainings (CourseId, tblLocations.LocationId, dateId,AvailableSeats,username) VALUES (@CosID, @LocID, @dat, @Available_Seating, @Username)&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim cmd = New SqlCommand(s, conn)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Parameters.AddWithValue(&quot;@cosID&quot;, Request.QueryString(&quot;cosId&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Parameters.AddWithValue(&quot;@locID&quot;, Request.QueryString(&quot;locid&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Parameters.AddWithValue(&quot;@dat&quot;, Request.QueryString(&quot;iddate&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Parameters.AddWithValue(&quot;@Available_Seating&quot;, 45 - 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Parameters.AddWithValue(&quot;@UserName&quot;, username)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Open()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.ExecuteNonQuery()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Close()</code><hr />
</div> We have 2 fieldnames, one field called Capacity is on a table called Location.<br />
<br />
This Capacity is of integer data type and has a value of 45.<br />
<br />
The other fieldname is called Available and is also of integer data type.<br />
<br />
This fieldname is on a table called trainings.<br />
<br />
The idea is to show Capacity Seating (which is 45) and to show Available Seats.<br />
<br />
Initially, the Available fieldname has no value.<br />
<br />
This trainings table is used to store information about people who register for a class.<br />
<br />
The first time a user signs up for a class, Available will show 44 seats remaining. You can see this from the code above:<br />
<br />
                cmd.Parameters.AddWithValue(&quot;@Available_Seating&quot;, 45 - 1)<br />
<br />
The problem is that after this initial decrease from 45 to 44, it doesn't decrease anymore.<br />
<br />
The idea is that each time someone signs up, the number decreases by 1 and will continue to decrease until the number is now 0.<br />
<br />
Of course, when it is 0, any attempt to sign up again by a user, a message will go out that class is full and user will be on a waiting list. This means that the user's registration info will be saved on the waiting list table.<br />
<br />
Not really worried about this waitinglist part.<br />
<br />
I just want to be able to have Available decrease by 1 each time a user signs up until 0.<br />
<br />
How do I make this work?<br />
<br />
Thanks as always for your continued assistance<br />
.</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?17-ASP.NET">ASP.NET</category>
			<dc:creator>IheChi</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237619-I-am-having-all-kinds-of-problems-with-this</guid>
		</item>
		<item>
			<title>To Bill Wilkinson</title>
			<link>http://www.aspmessageboard.com/showthread.php?237617-To-Bill-Wilkinson&amp;goto=newpost</link>
			<pubDate>Sun, 16 Jun 2013 00:56:56 GMT</pubDate>
			<description><![CDATA[HeyBill, it's good to see you still on this forum, helping other developers. I haven't been to this forum in a long time. You helped me out a lot yrs...]]></description>
			<content:encoded><![CDATA[<div>HeyBill, it's good to see you still on this forum, helping other developers. I haven't been to this forum in a long time. You helped me out a lot yrs ago.<br />
<br />
Good to see you still going strong.</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?21-Social-Lounge">Social Lounge</category>
			<dc:creator>eramgarden</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237617-To-Bill-Wilkinson</guid>
		</item>
		<item>
			<title>Seeking better performance</title>
			<link>http://www.aspmessageboard.com/showthread.php?237615-Seeking-better-performance&amp;goto=newpost</link>
			<pubDate>Fri, 14 Jun 2013 22:31:43 GMT</pubDate>
			<description>Code: 
--------- 
CREATE PROCEDURE D_Tigers  
@RestId binary(20) 
AS  
DECLARE @Table table ( id binary (20) )  
DECLARE @Id binary(20) 
DECLARE...</description>
			<content:encoded><![CDATA[<div><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">CREATE PROCEDURE D_Tigers <br />
@RestId binary(20)<br />
AS <br />
DECLARE @Table table ( id binary (20) ) <br />
DECLARE @Id binary(20)<br />
DECLARE @Result bit <br />
SET @Result = 0 <br />
<br />
IF (SELECT restId FROM tblRest WHERE restId=@RestId AND restParentId&lt;&gt;@RestId) = @RestId<br />
BEGIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblRest WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBrawl WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBook WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblIndie WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblScore WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBlock WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblItem WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblStone WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBlob WHERE restId=@RestId <br />
&nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblSecret WHERE restId=@RestId <br />
END<br />
ELSE<br />
BEGIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; INSERT INTO @Table SELECT restId FROM tblRest WHERE restParentId=@RestId<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHILE ( SELECT COUNT(id) FROM @Table ) &gt; 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; BEGIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET @Id = (SELECT TOP 1 id FROM @Table ORDER BY id ASC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblRest WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBrawl WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBook WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblIndie WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblScore WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBlock WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblItem WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblStone WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblBlob WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM tblSecret WHERE restId=@Id <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE FROM @Table WHERE id=@Id<br />
&nbsp; &nbsp; &nbsp; &nbsp; END<br />
END<br />
SET @Result = 1 <br />
SELECT @Result<br />
GO</code><hr />
</div> </div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?5-Database-(ADO-SQL-Access)">Database (ADO/SQL/Access)</category>
			<dc:creator>sbhmf</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237615-Seeking-better-performance</guid>
		</item>
		<item>
			<title>Consume a SSL web service from Classic ASP</title>
			<link>http://www.aspmessageboard.com/showthread.php?237613-Consume-a-SSL-web-service-from-Classic-ASP&amp;goto=newpost</link>
			<pubDate>Thu, 13 Jun 2013 09:52:49 GMT</pubDate>
			<description><![CDATA[I've researched the web extensively before posting this questions here, couldn't find anything useful for me, so here it goes. Sorry in advance for...]]></description>
			<content:encoded><![CDATA[<div>I've researched the web extensively before posting this questions here, couldn't find anything useful for me, so here it goes. Sorry in advance for the wall of text.<br />
<br />
I have a classic ASP website that needs to call a web service method (not wcf, but an asmx page) on a asp.net website (4.0)<br />
<br />
The way I consume the web service is as follows:<br />
<br />
I have a webserviceclass.asp that helps me consume web services in classic asp.<br />
<br />
code of webserviceclass.asp -&gt; <a rel="nofollow" href="https://docs.google.com/file/d/0B1Wr1Kw74xy3ZkducEtiTWNtWDA/edit?usp=sharing" target="_blank">https://docs.google.com/file/d/0B1Wr...it?usp=sharing</a><br />
<br />
Then calling the class to consume the method.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Dim strWebServiceResult<br />
Dim ws<br />
Set ws = new webservice<br />
ws.url = &quot;http://www.myurl.com/mywebservice.asmx&quot;<br />
ws.method = &quot;HelloWorld&quot;<br />
<br />
ws.parameters.Add &quot;Parameter1&quot;, &quot;Test1&quot;<br />
ws.parameters.Add &quot;Parameter2&quot;, &quot;Test2&quot;<br />
<br />
ws.Execute<br />
<br />
strWebServiceResult = ws.response</code><hr />
</div> This works perfectly if <a rel="nofollow" href="http://www.myurl.com" target="_blank">www.myurl.com</a> is not encrypted, strWebServiceResult holds the XML returned by mywebservice.asmx, however I really need the data traveling between the users and <a rel="nofollow" href="http://www.myurl.com" target="_blank">www.myurl.com</a> to be encrypted (mywebservice.asmx has parameters for login and password to authenticate on the webservice) so I bought an SSL cert and assigned it to <a rel="nofollow" href="http://www.myurl.com" target="_blank">www.myurl.com</a> website becoming <a rel="nofollow" href="https://www.myurl.com" target="_blank">https://www.myurl.com</a><br />
<br />
So when I set the URL in the class to: <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">ws.url = &quot;https://www.myurl.com/mywebservice.asmx&quot;</code><hr />
</div>  and that is the only thing that changes, the method doesn't get called anymore. I have log on pageinit and pageload of the mywebservice.aspx and it doesn't even get called.<br />
<br />
Sorry about the long text, and I hope someone can help me. I have no experience with jquery or json and I'd rather not go that way to solve this problem, however if that's the only way, I can try if there's enough info out there to help me out but I'd rather try to fix my current code if that possible. I just don't understand why it works with http but not with https<br />
<br />
Many thanks in advance</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?4-ASP">ASP</category>
			<dc:creator>TsetsE</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237613-Consume-a-SSL-web-service-from-Classic-ASP</guid>
		</item>
		<item>
			<title>All contact forms broken?</title>
			<link>http://www.aspmessageboard.com/showthread.php?237611-All-contact-forms-broken&amp;goto=newpost</link>
			<pubDate>Wed, 12 Jun 2013 16:54:38 GMT</pubDate>
			<description>I want to contact 4guysfromrolla regarding advertising and authoring articles.  However, the feedback form does not appear to exist any more and...</description>
			<content:encoded><![CDATA[<div>I want to contact 4guysfromrolla regarding advertising and authoring articles.  However, the feedback form does not appear to exist any more and submitting the advertising form results in an error.  The captcha on the advertising form is also broken.<br />
<br />
Is there any way to get in touch with the site's administrators at all?</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?8-Site-Feedback">Site Feedback</category>
			<dc:creator>SimonSmart</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237611-All-contact-forms-broken</guid>
		</item>
		<item>
			<title>paging with custom class objects</title>
			<link>http://www.aspmessageboard.com/showthread.php?237609-paging-with-custom-class-objects&amp;goto=newpost</link>
			<pubDate>Sat, 08 Jun 2013 09:34:43 GMT</pubDate>
			<description>Hi, 
 
I have created some custom class objects. 
 
public class astroObjects 
{ 
 
public int Id { get; set; } 
 
public String Name { get; set; }</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have created some custom class objects.<br />
<br />
public class astroObjects<br />
{<br />
<br />
public int Id { get; set; }<br />
<br />
public String Name { get; set; }<br />
<br />
public String Desc { get; set; }<br />
<br />
public int CatId { get; set; }<br />
<br />
public String ImageThumb { get; set; }<br />
<br />
}<br />
<br />
My data is stored in an SQL database.<br />
<br />
When I want to display the data I query the database and make a list as so.<br />
<br />
public static List&lt;astroObjects&gt; GetAstroObjects(int catId)<br />
{<br />
List&lt;astroObjects&gt; astroobjects = new List&lt;astroObjects&gt;();<br />
<br />
// Do all sql work including setting up connection, command, ect.<br />
<br />
SqlConnection conn;<br />
SqlCommand comm;<br />
SqlDataReader reader;<br />
String mySQL;<br />
<br />
int thecatid = catId;<br />
<br />
mySQL = &quot;SELECT objectName, object_id, Desc, objectThumbnail WHERE CatId = @catId ORDER BY objectName&quot;;<br />
<br />
<br />
string connectionString = ConfigurationManager.ConnectionStrings[&quot;myConnectionString&quot;].ConnectionString;<br />
conn = new SqlConnection(connectionString);<br />
comm = new SqlCommand(mySQL, conn);<br />
<br />
comm.Parameters.Add(&quot;@catid&quot;, System.Data.SqlDbType.Int);<br />
comm.Parameters[&quot;@catid&quot;].Value = thecatid;<br />
<br />
<br />
conn.Open();<br />
<br />
reader = comm.ExecuteReader();<br />
<br />
<br />
while (reader.Read())<br />
{<br />
<br />
astroObjects c = new astroObjects();<br />
c.Name = reader[&quot;ObjectName&quot;].ToString();<br />
<br />
c.Desc = reader[&quot;Desc&quot;].ToString();<br />
<br />
c.Id = Convert.ToInt16( reader[&quot;object_id&quot;]);<br />
c.ImageThumb=reader[&quot;ObjectThumbnail&quot;].ToString();<br />
<br />
astroobjects.Add(c);<br />
}<br />
<br />
return astroobjects;<br />
}<br />
<br />
I next want to bind this list to a datalist.<br />
<br />
Most examples of paging to datalist on the web I have seen are using dataset but I read this old article online <a rel="nofollow" href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=345" target="_blank">http://www.dotnetcurry.com/ShowArticle.aspx?ID=345</a> that says you can just bind to a pageddatasource so have done the following:<br />
<br />
protected void getTheData(int catid)<br />
<br />
{<br />
<br />
PagedDataSource page = new PagedDataSource();<br />
<br />
page.AllowCustomPaging = true;<br />
page.AllowPaging = true;<br />
<br />
page.DataSource = myproject.astroObjects.GetAstroObjects(catid); <br />
page.PageSize = 10;<br />
<br />
page.CurrentPageIndex = CurPage; <br />
<br />
Decimal intNumRecs;<br />
intNumRecs = 50;//need to replace with actual number of records returned in the query <br />
<br />
Decimal numPages;<br />
numPages = Math.Ceiling(intNumRecs / page.PageSize); <br />
<br />
int strCurPage;<br />
strCurPage = Convert.ToInt16(CurPage) + 1; <br />
<br />
LabelCurrentPage.Text = &quot;Pg: &quot; + strCurPage + &quot; of &quot; + numPages + &quot; (&quot; + intNumRecs + &quot; objects)&quot;;<br />
<br />
ButtonBack.Visible = (!page.IsFirstPage);<br />
ButtonNext.Visible = (!page.IsLastPage);<br />
<br />
DataList1.DataSource = page;<br />
<br />
DataList1.DataBind();<br />
<br />
}<br />
<br />
and here's the code for my next and previous buttons<br />
<br />
public void Next_Click(Object obj, EventArgs e)<br />
{<br />
<br />
<br />
//identify current datafilter<br />
<br />
CurPage += 1;<br />
<br />
getTheData(Convert.ToInt16(ViewState[&quot;DataFilterId&quot;]));<br />
<br />
<br />
}<br />
<br />
<br />
<br />
public void Prev_Click(Object obj, EventArgs e)<br />
{<br />
<br />
<br />
CurPage -= 1;<br />
<br />
getTheData(Convert.ToInt16(ViewState[&quot;DataFilterId&quot;]));<br />
}<br />
<br />
<br />
<br />
and here's my page load code <br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
checkloggedin();<br />
<br />
if (!IsPostBack) //if page loaded for the first time<br />
{<br />
<br />
CurPage = 0;<br />
getTheData(0);<br />
<br />
<br />
}<br />
<br />
if (IsPostBack) //if page has already loaded<br />
{<br />
<br />
CurPage = Convert.ToInt32(ViewState[&quot;CurPage&quot;]);<br />
getTheData(Convert.ToInt16(ViewState[&quot;DataFilterId&quot;]));<br />
<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
Here's how I set CurPage variable (Current page)<br />
<br />
<br />
public int CurPage<br />
{<br />
get<br />
{<br />
if (this.ViewState[&quot;CurPage&quot;] == null)<br />
return 0;<br />
else<br />
<br />
return Convert.ToInt16(this.ViewState[&quot;CurPage&quot;].ToString());<br />
<br />
}<br />
set<br />
{<br />
this.ViewState[&quot;CurPage&quot;] = value;<br />
}<br />
<br />
}<br />
<br />
and here's how I handle DataFilterId variable (category in the query)<br />
<br />
public int DataFilterId<br />
{<br />
<br />
get<br />
{<br />
if (this.ViewState[&quot;DataFilterId&quot;] == null)<br />
return 0;<br />
else<br />
<br />
return Convert.ToInt16(this.ViewState[&quot;DataFilterId&quot;].ToString());<br />
<br />
}<br />
set<br />
{<br />
this.ViewState[&quot;DataFilterId&quot;] = value;<br />
}<br />
}<br />
<br />
When I visit the page 10 records are displayed as expected. However when I click the next button the next 10 records aren't shown but the right page number is.<br />
<br />
I can't figure why this isn't working.<br />
<br />
The article uses Linq and I want to just do an SQL query as in the my list code above. I need to just query database so just the amount of records I need are retrieved from the database and added to the list.<br />
<br />
Hope some one can help me.<br />
<br />
Cheers<br />
<br />
Mark :)</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?5-Database-(ADO-SQL-Access)">Database (ADO/SQL/Access)</category>
			<dc:creator>markbpriv</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237609-paging-with-custom-class-objects</guid>
		</item>
		<item>
			<title><![CDATA[Passig <form> value to end of url?]]></title>
			<link>http://www.aspmessageboard.com/showthread.php?237607-Passig-lt-form-gt-value-to-end-of-url&amp;goto=newpost</link>
			<pubDate>Mon, 03 Jun 2013 18:24:25 GMT</pubDate>
			<description>Hi Guys 
 
I hope this one is possible. 
 
Basically, I have the following form script on my page...</description>
			<content:encoded><![CDATA[<div>Hi Guys<br />
<br />
I hope this one is possible.<br />
<br />
Basically, I have the following form script on my page (<a rel="nofollow" href="http://www.mysite.com/mycar/audi/a4?bodysyle=saloon):" target="_blank">http://www.mysite.com/mycar/audi/a4?bodysyle=saloon):</a><br />
<br />
-----------------------<br />
&lt;form name=&quot;myform&quot; method=&quot;get&quot; action=&quot;&quot; STYLE=&quot;margin: 0px; padding: 0px;&quot;&gt;<br />
<br />
Name: &lt;input type=&quot;text&quot; name=&quot;year&quot; size=&quot;20&quot;&gt;<br />
<br />
&lt;a href='javaScript<b></b>:document.myform.submit()'&gt;Add year&lt;/a&gt;<br />
<br />
<br />
&lt;/form&gt;<br />
-----------------------<br />
<br />
Which is fine, however, I need to post (get) the &quot;year&quot; value on the end of the url so that when I submit the form the url reads:<br />
<br />
<a rel="nofollow" href="http://www.mysite.com/mycar/audi/a4?bodysyle=saloon&amp;year=2012" target="_blank">http://www.mysite.com/mycar/audi/a4?...loon&amp;year=2012</a><br />
<br />
If I try adding the &quot;http://www.mysite.com/mycar/audi/a4?bodysyle=saloon&quot; url to the &quot;action&quot; value it will create:<br />
<br />
<a rel="nofollow" href="http://www.mysite.com/mycar/audi/a4?bodysyle=saloon?year=2012" target="_blank">http://www.mysite.com/mycar/audi/a4?...loon?year=2012</a><br />
<br />
which is no good. Is there a workaround?<br />
<br />
Any help would be fully appreciated<br />
<br />
Best regards<br />
<br />
Rod from the UK</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?4-ASP">ASP</category>
			<dc:creator>rjoseph</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237607-Passig-lt-form-gt-value-to-end-of-url</guid>
		</item>
		<item>
			<title>Broken Links for demo pages</title>
			<link>http://www.aspmessageboard.com/showthread.php?237605-Broken-Links-for-demo-pages&amp;goto=newpost</link>
			<pubDate>Mon, 03 Jun 2013 17:28:15 GMT</pubDate>
			<description>I was looking at the DataGrid Web Control series and was getting errors with demo links. I get this error: 
A network-related or instance-specific...</description>
			<content:encoded><![CDATA[<div>I was looking at the DataGrid Web Control series and was getting errors with demo links. I get this error:<br />
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)<br />
<br />
On this page <a rel="nofollow" href="http://aspnet.4guysfromrolla.com/demos/dgExample1.aspx" target="_blank">http://aspnet.4guysfromrolla.com/demos/dgExample1.aspx</a><br />
<br />
I know this is a very old article but it has helped me in the past.<br />
<br />
Thanks Mike</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?8-Site-Feedback">Site Feedback</category>
			<dc:creator>mike4ta</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237605-Broken-Links-for-demo-pages</guid>
		</item>
		<item>
			<title>404 redirect</title>
			<link>http://www.aspmessageboard.com/showthread.php?237603-404-redirect&amp;goto=newpost</link>
			<pubDate>Mon, 03 Jun 2013 13:29:59 GMT</pubDate>
			<description>Not sure where to put this question, here or IIS as it kind of ties in both. I am running some classic asp in iis 7.5 and have the usual 404 response...</description>
			<content:encoded><![CDATA[<div>Not sure where to put this question, here or IIS as it kind of ties in both. I am running some classic asp in iis 7.5 and have the usual 404 response code: Response.Status = &quot;404 Not Found&quot;. When this is triggered my site will redirect to a custom 404 page, which is fine. However, there are some search pages where results may come up null, this is not exactly a 404 as the user is told there are no results and to change search parameters. The problem is sites like Google treat this as a soft 404, which is not very good in their books for &quot;user experience&quot;. So what I can't seem to figure out is how to return a 404 response with asp for the sake of robots on specific pages, but not do a redirect to a 404 page. This did work fine back with iis 6, but with 7.5 every time the 404 code is returned the page is redirected no matter what.</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?4-ASP">ASP</category>
			<dc:creator>mike11</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237603-404-redirect</guid>
		</item>
		<item>
			<title>Problems using the SQL duplicates code from SQL Guru on this site</title>
			<link>http://www.aspmessageboard.com/showthread.php?237601-Problems-using-the-SQL-duplicates-code-from-SQL-Guru-on-this-site&amp;goto=newpost</link>
			<pubDate>Fri, 24 May 2013 03:49:56 GMT</pubDate>
			<description>I used the following code (adapted from a posting from SQL Guru).  However, I am getting the error at the bottom: 
 
 DELETE FROM tbl_events_temp...</description>
			<content:encoded><![CDATA[<div>I used the following code (adapted from a posting from SQL Guru).  However, I am getting the error at the bottom:<br />
<br />
 DELETE FROM tbl_events_temp WHERE tbl_events_temp.event_id IN (<br />
SELECT F.event_id<br />
FROM tbl_events_temp AS F<br />
WHERE EXISTS (<br />
<br />
SELECT airport_id, event_from, Count( event_id )<br />
FROM tbl_events_temp<br />
WHERE tbl_events_temp.airport_id = F.airport_id<br />
AND tbl_events_temp.event_from = F.event_from<br />
AND tbl_events_temp.airport_id != ''<br />
GROUP BY tbl_events_temp.airport_id, tbl_events_temp.event_from<br />
HAVING Count( tbl_events_temp.event_id ) &gt;1<br />
)<br />
)<br />
AND tbl_events_temp.event_id NOT<br />
IN (<br />
<br />
SELECT Min( event_id )<br />
FROM tbl_events_temp AS F<br />
WHERE EXISTS (<br />
<br />
SELECT airport_id, event_from, Count( event_id )<br />
FROM tbl_events_temp<br />
WHERE tbl_events_temp.airport_id = F.airport_id<br />
AND tbl_events_temp.event_from = F.event_from<br />
GROUP BY tbl_events_temp.airport_id, tbl_events_temp.event_from<br />
HAVING Count( tbl_events_temp.event_id ) &gt;1<br />
)<br />
GROUP BY airport_id, event_from<br />
)<br />
<br />
MySQL said: Documentation<br />
#1093 - You can't specify target table 'tbl_events_temp' for update in FROM clause</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?5-Database-(ADO-SQL-Access)">Database (ADO/SQL/Access)</category>
			<dc:creator>jeffsimon</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237601-Problems-using-the-SQL-duplicates-code-from-SQL-Guru-on-this-site</guid>
		</item>
		<item>
			<title>Adding new validation to radio button validation code</title>
			<link>http://www.aspmessageboard.com/showthread.php?237599-Adding-new-validation-to-radio-button-validation-code&amp;goto=newpost</link>
			<pubDate>Thu, 23 May 2013 15:32:28 GMT</pubDate>
			<description><![CDATA[I have code in place that does its job that an entry 'must' be made on each set of radio buttons. Either Yes or No. 
 
However, people are 'required'...]]></description>
			<content:encoded><![CDATA[<div>I have code in place that does its job that an entry 'must' be made on each set of radio buttons. Either Yes or No.<br />
<br />
However, people are 'required' to enter yes on at least one of them and this validation doesn't check for that.<br />
It 'will' allow people to check 'no' for all three sets'. I need it to know that they are checking at least one of the 'yes' selections.  If anyone has advice on what needs to be added i'd appreciate the point in the right direction!<br />
<br />
Here is the javascript...<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">function RadioValidator()<br />
{<br />
&nbsp; &nbsp; var ShowAlert = '';<br />
&nbsp; &nbsp; var AllFormElements = window.document.getElementById(&quot;form1&quot;).elements;<br />
&nbsp; &nbsp; for (i = 0; i &lt; AllFormElements.length; i++) <br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (AllFormElements[i].type == 'radio') <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ThisRadio = AllFormElements[i].name;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ThisChecked = 'No';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var AllRadioOptions = document.getElementsByName(ThisRadio);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (x = 0; x &lt; AllRadioOptions.length; x++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (AllRadioOptions[x].checked &amp;&amp; ThisChecked == 'No')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ThisChecked = 'Yes';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var AlreadySearched = ShowAlert.indexOf (ThisRadio);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ThisChecked == 'No' &amp;&amp; AlreadySearched == -1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowAlert = ShowAlert + ThisRadio + 'at least one must be answered\n';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (ShowAlert != '')<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; alert(ShowAlert);<br />
&nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; else<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; return true;<br />
&nbsp; &nbsp; }<br />
}</code><hr />
</div> Here is the code in the yes/no radio buttons...<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">HTML Code:</div>
	<hr /><code class="bbcode_code"><span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>I am a this?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason1&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;This?&quot;</span> id=<span style="color:#0000FF">&quot;reason1&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl1').style.display='block'&quot;</span>&gt;</span>Yes<span style="color:#FF8000">&lt;/label&gt;</span><br />
&nbsp; &nbsp; <span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;This?&quot;</span> id=<span style="color:#0000FF">&quot;reason1&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl1').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span><br />
<br />
<span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>That?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason2&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;That?&quot;</span> id=<span style="color:#0000FF">&quot;reason2&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl2').style.display='block'&quot;</span>&gt;</span> Yes<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;That?&quot;</span> id=<span style="color:#0000FF">&quot;reason2&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl2').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span><br />
<br />
<span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>I am the other?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason3&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;theother?&quot;</span> id=<span style="color:#0000FF">&quot;reason3&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl3').style.display='block'&quot;</span>&gt;</span> Yes<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;theother?&quot;</span> id=<span style="color:#0000FF">&quot;reason3&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl3').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span></code><hr />
</div> <br />
thank you in advance for any advice/input you can provide!<br />
<br />
iiSwanSongii</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?11-JavaScript-JScript">JavaScript/JScript</category>
			<dc:creator>iiswansongiiAtWork</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237599-Adding-new-validation-to-radio-button-validation-code</guid>
		</item>
		<item>
			<title>Weighting sql results</title>
			<link>http://www.aspmessageboard.com/showthread.php?237597-Weighting-sql-results&amp;goto=newpost</link>
			<pubDate>Tue, 21 May 2013 23:05:35 GMT</pubDate>
			<description><![CDATA[I'm using MSSQL2008. I have a table that I need to search one field for matches from a user input search string. I have a script that pieces together...]]></description>
			<content:encoded><![CDATA[<div>I'm using MSSQL2008. I have a table that I need to search one field for matches from a user input search string. I have a script that pieces together the SQL statement depending on how may words are in the search string.<br />
<br />
So far so good. Now I want to be able to sort the table so that the records that have the most matches of words in the search string will be first. To this end I have come up with this:<br />
<br />
Original Search String: &quot;The Tonic Tavern &amp; Kitchen&quot;<br />
<br />
Some script code converts that into the individual words &quot;Tonic&quot; and &quot;Tavern&quot; and &quot;Kitchen&quot;.<br />
<br />
SELECT v_name , <br />
(CASE WHEN v_name LIKE '%Tonic%' THEN 1 ELSE 0 END) AS weight0, <br />
(CASE WHEN v_name LIKE '%Tavern%' THEN 1 ELSE 0 END) AS weight1, <br />
(CASE WHEN v_name LIKE '%Kitchen%' THEN 1 ELSE 0 END) AS weight2, <br />
SUM(weight0+weight1+weight2+ 0) AS masterweight <br />
FROM ss_venue <br />
WHERE v_state = 'AZ' <br />
AND (v_name like '%Tonic%' OR v_name like '%Tavern%' OR v_name like '%Kitchen%' ) <br />
ORDER BY masterweight DESC<br />
<br />
Assuming the 3-word input, this is meant to give me column called &quot;masterweight&quot; with a value of 3 for records that match all terms, 2 for records that match 2 terms etc...<br />
<br />
I get an error that says &quot; Invalid column name 'weight0'. &quot; yet if I remove the &quot;SUM()&quot; and say ORDER BY weight0 at the end it's fine. So why is it a column one way and not the other??? What am I missing?</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?5-Database-(ADO-SQL-Access)">Database (ADO/SQL/Access)</category>
			<dc:creator>enigma65</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237597-Weighting-sql-results</guid>
		</item>
		<item>
			<title>How do I send my user to a custom login page if/when they time out?</title>
			<link>http://www.aspmessageboard.com/showthread.php?237595-How-do-I-send-my-user-to-a-custom-login-page-if-when-they-time-out&amp;goto=newpost</link>
			<pubDate>Tue, 21 May 2013 10:46:14 GMT</pubDate>
			<description>I have implemented a timeout with slidingexpiration in my web.config which by default sends the user to the default.aspx page which has the login...</description>
			<content:encoded><![CDATA[<div>I have implemented a timeout with slidingexpiration in my web.config which by default sends the user to the default.aspx page which has the login control.  I woulf like to change this behavior such that the user would be directed to a page that will have a login control plus information telling them that they have arrived at this page due to a timeout.  I'm trying to avoid the following scenario.  A user leaves their computer while logged in to my application intending to return shortly and thus does not log out.  However they get distracted and do not return within the allowed timeout period and find that when they make an entry they are immediately looking at the login page without any indication as to why they have been sent here.  I have found some blogs with ideas for presenting an alert that a timeout is about to occur, but with the slidingexpiration this would not occur unless they were not activiely using the application and thus would not be present to see the alert.  Thank you for any suggestions you choose to offer..............................Phil Hoop</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?17-ASP.NET">ASP.NET</category>
			<dc:creator>PhilHoop@mm.com</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237595-How-do-I-send-my-user-to-a-custom-login-page-if-when-they-time-out</guid>
		</item>
	</channel>
</rss>
