DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 16 Aug 2007 05:24:55 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    JJ297
          2    JJ297
          3    Ladislav Mrnka


validation page   
I'm getting an error message on my validation page on this bit of
code:

If Request.QueryString = "" Then
            Response.Redirect("cdpadmineditpage.aspx")
        End If

This is the error message:
Overload resolution failed because no accessible '=' can be called
with these arguments:
'Public Shared Operator =(a As String, b As String) As Boolean': Value
of type 'System.Collections.Specialized.NameValueCollection' cannot be
converted to 'String'.

I have a generated email going to someone when users enter a
question.  The person answering the email will get a link to that
question.  That link takes them to edit page with the question ID in
the querystring.

Here's the info that generates an email which is on another page.

Dim x As Integer
 x = cmd.ExecuteScalar 'will bring back my quesID for the email
 command.ExecuteNonQuery()

            Dim ocdoEmail As New Object
            ocdoEmail = Server.CreateObject("CDO.Message")
            ocdoEmail.To = Session("GetEmail")
            ocdoEmail.From = Session("GetEmail")
            ocdoEmail.Subject = "EDCS Question"
            ocdoEmail.HTMLBody =
"<a href=""http://seb2a54/cdpedcsfaqs/cdpadminEditpage.aspx?quesid=" &
x & """>
 Click to view question that was submitted.</a>"

            ocdoEmail.send()

How do write the code if the user is coming in from a querystring then
let them have access to that page when they click on the link when I'm
using ExecuteScalar?

If Request.QueryString = ??? Then
            Response.Redirect("cdpadmineditpage.aspx")
        End If


Thanks!
Date:Thu, 16 Aug 2007 05:24:55 -0700   Author:  

Re: validation page   
On Aug 16, 8:24 am, JJ297  wrote:

> I'm getting an error message on my validation page on this bit of
> code:
>
> If Request.QueryString = "" Then
>             Response.Redirect("cdpadmineditpage.aspx")
>         End If
>
> This is the error message:
> Overload resolution failed because no accessible '=' can be called
> with these arguments:
> 'Public Shared Operator =(a As String, b As String) As Boolean': Value
> of type 'System.Collections.Specialized.NameValueCollection' cannot be
> converted to 'String'.
>
> I have a generated email going to someone when users enter a
> question.  The person answering the email will get a link to that
> question.  That link takes them to edit page with the question ID in
> the querystring.
>
> Here's the info that generates an email which is on another page.
>
> Dim x As Integer
>  x = cmd.ExecuteScalar 'will bring back my quesID for the email
>  command.ExecuteNonQuery()
>
>             Dim ocdoEmail As New Object
>             ocdoEmail = Server.CreateObject("CDO.Message")
>             ocdoEmail.To = Session("GetEmail")
>             ocdoEmail.From = Session("GetEmail")
>             ocdoEmail.Subject = "EDCS Question"
>             ocdoEmail.HTMLBody =
> "<a href=""http://seb2a54/cdpedcsfaqs/cdpadminEditpage.aspx?quesid=" &
> x & """>
>  Click to view question that was submitted.</a>"
>
>             ocdoEmail.send()
>
> How do write the code if the user is coming in from a querystring then
> let them have access to that page when they click on the link when I'm
> using ExecuteScalar?
>
> If Request.QueryString = ??? Then
>             Response.Redirect("cdpadmineditpage.aspx")
>         End If
>
> Thanks!


Figured it out...
If Request.QueryString("quesid") = "" Then
            Response.Redirect("cdpadmineditpage.aspx")
        End If
Date:Thu, 16 Aug 2007 06:10:50 -0700   Author:  

RE: validation page   
Hi,

if you are trying to test if query string exists use If 
Request.QueryString.Count = 0.

Regards,
Ladislav

"JJ297" wrote:


> I'm getting an error message on my validation page on this bit of
> code:
> 
> If Request.QueryString = "" Then
>             Response.Redirect("cdpadmineditpage.aspx")
>         End If
> 
> This is the error message:
> Overload resolution failed because no accessible '=' can be called
> with these arguments:
> 'Public Shared Operator =(a As String, b As String) As Boolean': Value
> of type 'System.Collections.Specialized.NameValueCollection' cannot be
> converted to 'String'.
> 
> I have a generated email going to someone when users enter a
> question.  The person answering the email will get a link to that
> question.  That link takes them to edit page with the question ID in
> the querystring.
> 
> Here's the info that generates an email which is on another page.
> 
> Dim x As Integer
>  x = cmd.ExecuteScalar 'will bring back my quesID for the email
>  command.ExecuteNonQuery()
> 
>             Dim ocdoEmail As New Object
>             ocdoEmail = Server.CreateObject("CDO.Message")
>             ocdoEmail.To = Session("GetEmail")
>             ocdoEmail.From = Session("GetEmail")
>             ocdoEmail.Subject = "EDCS Question"
>             ocdoEmail.HTMLBody =
> "<a href=""http://seb2a54/cdpedcsfaqs/cdpadminEditpage.aspx?quesid=" &
> x & """>
>  Click to view question that was submitted.</a>"
> 
>             ocdoEmail.send()
> 
> How do write the code if the user is coming in from a querystring then
> let them have access to that page when they click on the link when I'm
> using ExecuteScalar?
> 
> If Request.QueryString = ??? Then
>             Response.Redirect("cdpadmineditpage.aspx")
>         End If
> 
> 
> Thanks!
> 
> 
Date:Thu, 16 Aug 2007 18:04:52 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us