I am starting a website where an image shows on the home page and when I scroll to hover over the image it opens a newpage. I’m trying to figure out a way to do a slow dissolve from the home page to new page and also if the user has a pop up blocker on how to get around from home page to new page that if there is a way. Here is the code I have now html:

 <!DOCTYPE HTML> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Daily Process</title> <script src="Scripts/jquery-1.10.2.min.js"></script>"> <link type="text/css" href="Content/dailyprocessbootstrap.css" rel="stylesheet" /> </head> <body> <div > 

            <img src="images/White%20Daily%20Sig.png" class="center"/> </div> </body> <script>
       $(function () {
       var count = 0;
       $("img").mouseenter(function () {
         if (count == 0) {
            setTimeout(function () {
                window.open("/About.aspx");
                    },5000)

            count++;
        } 

     })
    })
</script> </html>

and css:

img {
   /*max-width: 200%;*/
    width: 80%;
    height: auto;
    background-color: #000;
    vertical-align: middle;
    border: 0;
    -ms-interpolation-mode: bicubic
}
.center {
 display: block;
 margin-left: auto;
 margin-right: auto;
 width: 95%;
}

It should be rspxml instead of doc.

var els = rspxml.Root.Elements("AmazonTrackingResponse").FirstOrDefault().Elements("TrackingEventHistory").FirstOrDefault().Elements("TrackingEventDetail");

Thanks

OK what I'm trying to do is to create a routine in C# that writes out the XML. The XML is in my original post. I put the routine or method of what I have so far in my original post as well. That is the C# code. I just need assistance in a) knowing if what I'm doing in C# is on the right path and if not b) what should I do?

I'm trying to code this in C# so it will output the values for each element in XML.

Sample XML:

    <APIVersion>4.0</APIVersion> <PackageTrackingInfo> <TrackingNumber>123456789</TrackingNumber> <PackageDestinationLocation> <City>Seattle</City> <StateProvince>WA</StateProvince> <PostalCode>98107</PostalCode> <CountryCode>US</CountryCode> </PackageDestinationLocation> <PackageDeliveryDate> <ScheduledDeliveryDate>2004-09-15</ScheduledDeliveryDate> <ReScheduledDeliveryDate>2004-09-18</ReScheduledDeliveryDate> </PackageDeliveryDate> <TrackingEventHistory> <TrackingEventDetail> <EventStatus>LK</EventStatus> <EventReason>AQ</EventReason> <EventDateTime>2004-08-22T11:00:00-
    08:00</EventDateTime> <EventLocation> <City>SEATTLE</City> <StateProvince>WA</StateProvince> <PostalCode>98107</PostalCode> <CountryCode>US</CountryCode> </EventLocation> <SignedForByName>JOHN GALT</SignedForByName> </TrackingEventDetail>  </PackageTrackingInfo>

Here is what I have so far. What would be the best way to handle outputting the XML.

 rspxml.Root.Add(
                    new XElement("API", "4.0"),
                    new XElement("PackageTrackingInfo",
                        new XElement("TrackingNumber", prc.ProNumber)
                    ),
                    new XElement("PackageDestinationLocation",
                        new XElement("City", prc.Consignee.City),
                        new XElement("StateProvince", prc.Consignee.State),
                        new XElement("PostalCode", prc.Consignee.Zipcode),
                        new XElement("CountryCode", prc.Consignee)
                    ),
                    new XElement("PackageDeliveryDate",
                        new XElement("ScheduledDeliveryDate", prc.Consignee),
                        new XElement("ReScheduledDeliveryDate", prc.Consignee)
                    ));
                    var els = doc.Root.Elements("AmazonTrackingResponse").FirstOrDefault().Elements("TrackingEventHistory").FirstOrDefault().Elements("TrackingEventDetail");

                    foreach (XElement row in els) //each row
                    {
                        foreach (XElement col in row.Elements("EventStatus"))
                        {
                            new XElement("EventStatus", EventCode.Delivered.ToXml());
                        }
                        foreach (XElement col in row.Elements("EventReason"))
                        {
                        }
                        foreach (XElement col in row.Elements("EventDateTime"))
                        {
                        }
                        foreach (XElement col in row.Elements("EventLocation"))
                        {
                            foreach (XElement subcol in row.Elements("City"))
                            {
                            }
                            foreach (XElement subcol in row.Elements("PostalCode"))
                            {
                            }
                            foreach (XElement subcol in row.Elements("CountryCode"))
                            {
                            }
                        }
                        foreach (XElement col in row.Elements("EstimatedDeliveryDate"))
                        {
                        }
                        foreach (XElement col in row.Elements("DeliveryAppointmentWindow"))
                        {
                            foreach (XElement subcol in row.Elements("Day"))
                            {
                            }
                            foreach (XElement subcol in row.Elements("StartTime"))
                            {
                            }
                            foreach (XElement subcol in row.Elements("EndTime"))
                            {
                            }
                            foreach (XElement subcol in row.Elements("TimeZone"))
                            {
                            }
                        }
                    }

I still need assistance from someone. I've provided the code and broke down what I need help with. Please someone help.

OK hopefully this clears up what I'm doing a little bit. I'm trying to output XML. Here is some updated code of what I have. I really hope this makes more sense.

I formatted using XElement which is associated with LINQ i believe. It looks like this and this is not all of the code but some it so you get the idea.

Soap.asmx.cs:

public string ProcessXML(string xmlRequest)
        {
            XDocument rspxml = null;
            Saia.Presentation.Website.SaiaSecure.WebService.Shipment.Response response = new Saia.Presentation.Website.SaiaSecure.WebService.Shipment.Response();
            string testMode = "";

            try
            {
                if (bool.Parse(WebConfigurationManager.AppSettings["Debug"]) == true)
                    File.WriteAllText("c:\\temp\\" + DateTime.Now.ToString("MMddyyy_HHmmss") + ".xml", xmlRequest);
                // Determine Method to Call
                XmlDocument doc = new XmlDocument();
                doc.XmlResolver = null;
                doc.LoadXml(xmlRequest);

                string method = doc.FirstChild.Name;

                if (method.ToLower() == "xml")
                {
                    method = doc.FirstChild.NextSibling.Name;
                }

                if (method == "AmazonTrackingRequest")
                {
                    Saia.Data.General.Shipment prc = new Data.General.Shipment();
                    string pronum = doc.FirstChild.SelectSingleNode("TrackingNumber").InnerText;
                    prc.GetByProNumber(decimal.Parse(pronum));

                    rspxml = XDocument.Load("<?xml version=\"1.0\" encoding=\"UTF-8\"?><AmazonTrackingResponse xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"AmazonTrackingResponse.xsd\">");
                    rspxml.Root.Add(new XElement("APIVersion", "4.0"));
                    rspxml.Root.Add(new XElement("PackageTrackingInfo"));
                    rspxml.Root.Element("PackageTrackingInfo").Add(new XElement("TrackingNumber", prc.ProNumber.ToString()));
                    rspxml.Root.Add(new XElement("PackageDestinationLocation"));
                    rspxml.Root.Element("PackageDestinationLocation").Add(new XElement("City", prc.Consignee.ToString()));
                    rspxml.Root.Element("PackageDestinationLocation").Add(new XElement("StateProvince", prc.Consignee.ToString()));
                    rspxml.Root.Element("PackageDestinationLocation").Add(new XElement("PostalCode", prc.Consignee.ToString()));
                    rspxml.Root.Element("PackageDestinationLocation").Add(new XElement("CountryCode", prc.Consignee.ToString()));
                    rspxml.Root.Add(new XElement("PackageDeliveryDate"));
                    rspxml.Root.Element("PackageDeliveryDate").Add(new XElement("ScheduledDeliveryDate", prc.Consignee.ToString()));
                    rspxml.Root.Element("PackageDeliveryDate").Add(new XElement("ReScheduledDeliveryDate", prc.Consignee.ToString()));
                   .....

                }

            }
            catch (CodeException e)
            {

                Core.Framework.Debug.CodeException(xmlRequest, e);
            }
            catch (Exception e)
            {

                Core.Framework.Debug.Exception(xmlRequest, e);
            }

            return rspxml.ToString();
        }

The problem I'm having now is when I debug by stepping into the code it blows up with an 'object is not set to instance of an object' error in the class file on this line:

string response = shipment.ProcessXML(xmlreq);

Class1.cs:

class Class1
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread] ...

Hi AssertNull,

Yes that XML is part of what I posted and it does have a </PackageDeliveryDate> end tag.

The value of the xml request is

string xmlreq = "<AmazonTrackingRequest xmlns:xsi=\"www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"AmazonTrackingRequest.xsd\"><Validation><UserID>AMZN</UserID><Password>12345</Password></Validation><APIVersion>4.0</APIVersion><TrackingNumber>123456</TrackingNumber></AmazonTrackingRequest> ";

Saia.Presentation.Website.SaiaSecure.WebService.Shipment.Response is my own C# class

Expected input and output? I have no idea what you mean here for input. I would guess that would be the code I provided. Do you know anything about Amazon Web Services. The XML code will output those fields for Amazon Web Services.
12345 (TrackingNumber )
Phoenix (City)
AZ (State)
...
That's the expected output.

OMG now you are making this more difficult. I'M trying to convert the XML for Amazon web services. I have to write the code in C# to pick up each field that is in the XML.

My terminology is not good because I'm not sure what to do. There are two pieces of code I provided: XML and C#. In the if (method == "AmazonTrackingRequest") statement in the C# code, I have a SelectSingleNode for Tracking Number and if you look at the XML code Tracking Number is the first field. I'm not sure how to code the next field in that XML which is City in C# like I did for the Tracking Number field and then so on with the next field State, and then Postal Code... Does that make sense? For example, the code that I have in C# for City:
var city = doc.SelectNodes("City");, I'm not sure if that is correct and that is what I need assistance with.

The XML file that I posted. I'm trying to get each field to write from that file: Tracking Number, Package Destination Location:City, State, Postal Code, and Scheduled Delivery Date to return nodes in the c# code and I'm not sure if I'm doing that correctly. Does that make sense?

I am trying get c# to select multiple nodes in XML. I'm not sure how to do this here is the xml code followed by c#:

<PackageTrackingInfo> <TrackingNumber>123456789</TrackingNumber> <PackageDestinationLocation> <City>Seattle</City> <StateProvince>WA</StateProvince> <PostalCode>98107</PostalCode> <CountryCode>US</CountryCode> </PackageDestinationLocation> <PackageDeliveryDate> <ScheduledDeliveryDate>2004-09-15</ScheduledDeliveryDate>

And here is c# code:

public string ProcessXML(string xmlRequest)
        {
            XmlDocument rsp = null;
            Saia.Presentation.Website.SaiaSecure.WebService.Shipment.Response response = new Saia.Presentation.Website.SaiaSecure.WebService.Shipment.Response();
            string testMode = "";

            try
            {
                if (bool.Parse(WebConfigurationManager.AppSettings["Debug"]) == true)
                    File.WriteAllText("c:\\temp\\" + DateTime.Now.ToString("MMddyyy_HHmmss") + ".xml", xmlRequest);
                // Determine Method to Call
                XmlDocument doc = new XmlDocument();
                doc.XmlResolver = null;
                doc.LoadXml(xmlRequest);

                string method = doc.FirstChild.Name;

                if (method.ToLower() == "xml")
                {
                    method = doc.FirstChild.NextSibling.Name;
                }

                if (method == "AmazonTrackingRequest")
                {
                    Saia.Data.General.Shipment prc = new Data.General.Shipment();
                    string pronum = doc.FirstChild.SelectSingleNode("TrackingNumber").InnerText;
                    prc.GetByProNumber(decimal.Parse(pronum));
                    var city = doc.SelectNodes("City");
                var state = doc.SelectNodes("State");
                var postcode = doc.SelectSingleNode("PostalCode");
                ...

                    rsp = new XmlDocument();

                }

            }
            catch (CodeException e)
            {

                Core.Framework.Debug.CodeException(xmlRequest, e);
            }
            catch (Exception e)
            {

                Core.Framework.Debug.Exception(xmlRequest, e);
            }

            return rsp.InnerXml;
        }
    }

Need on the best way to going about programming this in c#. I'm trying to do an if record exists update statement else insert statement:

OracleConnection con = new OracleConnection(strConnection);
        con.Open();
        OracleCommand check_RID = new OracleCommand("SELECT COUNT(*) FROM CONTRACT_INFO WHERE (rid = @rid)", con);
        check_RID.Parameters.Add("@rid", labelRID.Text);
        OracleDataReader reader = check_RID.ExecuteReader();

        if (reader.HasRows)
        {
            OracleConnection conn = new OracleConnection();  // C#
            conn.ConnectionString = strConnection;
            conn.Open();

            OracleCommand cmd = new OracleCommand();
            cmd.Connection = conn;
            cmd.CommandText = "UPDATE...

            cmd.ExecuteNonQuery();

            conn.Close();
            Response.Redirect("primecontractor.aspx?Id=" + labelRID.Text);
        }
        else
        {

            OracleConnection conn = new OracleConnection();  // C#
            conn.ConnectionString = strConnection;
            conn.Open();

            OracleCommand cmd = new OracleCommand();
            cmd.Connection = conn;
            cmd.CommandText = "INSERT....
          ......

            cmd.ExecuteNonQuery();

            conn.Close();

Is there a better way to program this and if so how?

Anyone with any ideas on this please.

[QUOTE=abelLazm;1523487]Try the following code[CODE]string url="http://www.google.com";
Response.Write("<script>window.open('" +url+ "');</script>");[/CODE][/QUOTE]
Just trying to see how I could apply this code to my code:

I updated this:

[CODE]redirect += "?ReqURL=" + strWebURL;[/CODE]
to this this:

[CODE]string redirect = getAppSettingsValue(m_SiteCollCustAcsDndPG);
[B]redirect += ("<script>window.open?ReqURL=" + strWebURL + ");</script>");[/B]

                if (!string.IsNullOrEmpty(strOwnerEmail))
                    redirect += "&OwnEmail=" + strOwnerEmail;

                if(!string.IsNullOrEmpty(strOwnerName))
                    redirect += "&OwnName=" + strOwnerName;

                HttpContext.Current.Response.Redirect(redirect, false);                    
            }
        }
        catch (Exception ex)
        {
            //Do your exception handling

            HttpContext.Current.Server.ClearError();
            HttpContext.Current.Response.Clear();

            string url = "/Pages/AccessDeniedOverride.aspx";
         HttpContext.Current.Response.Write("<script>window.open('" + url + "');</script>");

            HttpContext.Current.Response.Redirect("/Pages/AccessDeniedOverride.aspx?Error=true&Message=" + ex.Message);
        }[/CODE]

Does this look correct. I can't tell whether I need to update the HttpContext redirect line or the redirect + line.

I need help on a section of the code below to revise so instead of redirect to a full page I want it to redirect and open as a popup window. How can i change the code I have to make this possible.

[CODE]void context_AcessDenied(object sender, EventArgs e)
{
try
{
HttpApplication httpApp = sender as HttpApplication;
HttpContext context = httpApp.Context;

            string httpUrl = context.Request.Url.ToString();   
            string strSiteURL = string.Empty;
            string strWebURL = string.Empty;
            string strOwnerName = string.Empty;
            string strOwnerEmail = string.Empty;

            if (httpUrl.ToLower().Contains("/_layouts/accessdenied.aspx") && !httpUrl.ToLower().Contains("loginasanotheruser=true"))
            {
                strSiteURL = SPContext.Current.Web.Url;

                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    using (SPSite site = new SPSite(strSiteURL))
                    {
                        using (SPWeb web = site.OpenWeb())
                        {
                            strWebURL = web.Url;
                            SPGroupCollection groups = web.Groups;

                            foreach (SPGroup group in groups)
                            {
                                if (group.Name.ToLower().Contains("owner") && !group.Name.ToLower().Contains("sub-owner") && group.Users.Count > 0)
                                {
                                    SPUser owner = group.Users[0];
                                    strOwnerName = owner.Name;
                                    strOwnerEmail = owner.Email;
                                }
                            }
                        }
                    }
                });

                HttpContext.Current.Server.ClearError();
                HttpContext.Current.Response.Clear();
                //strCustomAcssDndURL = getAppSettingsValue(m_SiteCollCustAcsDndPG + "-" + strSiteURL);
                //HttpContext.Current.Response.Redirect(strCustomAcssDndURL, false);

                string redirect = getAppSettingsValue(m_SiteCollCustAcsDndPG);
                redirect += "?ReqURL=" + strWebURL;

                if (!string.IsNullOrEmpty(strOwnerEmail))
                    redirect += "&OwnEmail=" + strOwnerEmail;

                if(!string.IsNullOrEmpty(strOwnerName))
                    redirect += "&OwnName=" + strOwnerName;

                HttpContext.Current.Response.Redirect(redirect, false);                    
            }
        }
        catch (Exception ex)
        {
            //Do your exception handling

            HttpContext.Current.Server.ClearError();
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Redirect("/Pages/AccessDeniedOverride.aspx?Error=true&Message=" + ex.Message);
        }
    }[/CODE]

[QUOTE=adatapost;1350469]You need to rebind the [B]gridview[/B] after deletion of record.[/QUOTE]
How is that done? Is that done in the code behind. Can that be done on the datasource?

I have a dropwdown where I select a name from the dropdown list. This populates a grid view with that record. Once I select that record it will populate a form with textboxes of info for that record. There is a delete button in that form and when I click the delete button I want it to refresh the grid with that record removed from the grid. so it shows a blank grid or the grid minus that record. Does anyone know how to do this. Is this something handled in the code behind? Here is my code for the delete button on the design page:
[CODE]<asp:button id="deleteButton" CommandName="Delete"
style="background-image:url('Images/Button.gif'); text-align:center;background-color:Transparent; cursor:hand; background-repeat:no-repeat; background-position:left; padding-left:15px;"
Runat="server" Height="25px" BorderStyle=None ForeColor=White Text="Delete"
Width="99px" CssClass="style3" onclientclick="return confirm('Are you surely want to delete this record?');" /> [/CODE]

and I have used a databind to the grid on the page load and delete button event and neither has worked.

I have a dropdown list on aspx page that is using a data source select command to pull from a database. The don't any data in the dropdown when I preview the page. I need help on what I am doing wrong. Here is my code for the dropdown list and data source:

[CODE]<asp:DropDownList runat="server" id="DropDownList2" AutoPostBack="true" DataValueField="POPULATION_LIST_ID" DataSourceID="sdsLastName" DataTextField="Last_Name" Visible="True" Height="26px" >

                        </asp:DropDownList>

<asp:SqlDataSource runat="server" id="sdsLastName" SelectCommand="SELECT DISTINCT LAST_NAME FROM CHP_POPULATION_LIST" ProviderName="System.Data.OracleClient" ConnectionString="Data Source=cora;Persist Security Info=True;User ID=catdb;Password=ca222tdb;Unicode=True">
<SelectParameters>
<asp:controlparameter ControlID="DropDownList2" PropertyName="SelectedValue" Name="LAST_NAME" />
</SelectParameters>
</asp:SqlDataSource>

[/CODE]

I keep getting this error:

Procedure 'cnpcpiFarmFormAssignField' expects parameter '@chUserId', which was not supplied.

[CODE]if request.Form("hidAction") = "" and request.QueryString("sid") = "" then
sFormAction = "New"
else

Set cmd = Server.CreateObject("ADODB.Command")
with cmd
    .ActiveConnection = DataConn
    .CommandType = adCmdStoredProc
end with

'On Error Resume Next

if request.Form("hidAction") = "New" then
    'cint(iFormId) = request.QueryString("iFormId")
    'Insert Record

    With cmd

        .CommandText = "cnpcpiFarmFormAssignField"          
        Set prmiFormId = .CreateParameter("@iFormId",adInteger,adParamInput,,request.Form("hidiFormId"))
        Set prmiFieldId = .CreateParameter("@iFieldId",adInteger,adParamInput,,request.Form("lstFormField"))
        Set prmiSequenceId = .CreateParameter("@iSequence",adInteger,adParamInput,,request.Form("lstSequence"))
        Set prmvchLabel = .CreateParameter("@vchLabel", adVarChar, adParamInput, 50,trim(request.Form("txtLabel")))
        Set prmtiRequired = .CreateParameter("@tiRequiredField",adInteger,adParamInput,,cint(request.Form("lstRequired")))
        'set prmtiAlphaNumericCheck = .CreateParameter("@tiAlphaNumericCheck",adInteger,adParamInput,,iNumericAlphaCheck)
        if request.Form("txtMinLength") = "" then 
            set prmiMinLength = .CreateParameter("@iMinLength",adInteger,adParamInput,,null)
        else
            set prmiMinLength = .CreateParameter("@iMinLength",adInteger,adParamInput,,cint(request.Form("txtMinLength")))
        end if

        if request.Form("txtMaxLength") = "" then 
            set prmiMaxLength = .CreateParameter("@iMaxLength",adInteger,adParamInput,,null)
        else
            set prmiMaxLength = .CreateParameter("@iMaxLength",adInteger,adParamInput,,cint(request.Form("txtMaxLength")))
        end if
        set prmiSize = .CreateParameter("@iSize",adInteger,adParamInput,,cint(request.Form("txtSize")))  'M001a
        Set prmUserId = .CreateParameter("@chUserId",adChar,adParamInput,10,getOnyxUserId)
        Set prmiFormFieldId = .CreateParameter("@iFormFieldId",adInteger,adParamOutput)
        Set prmReturnValue = .CreateParameter("@iReturnCode",adInteger,adParamOutput)

        .Parameters.Append prmiFormId
        .Parameters.Append prmiFieldId
        .Parameters.Append prmiSequenceId
        .Parameters.Append prmvchLabel
        .Parameters.Append prmtiRequired

        '.Parameters.Append prmtiAlphaNumericCheck
        .Parameters.Append prmiMinLength
        .Parameters.Append prmiMaxLength
        .Parameters.Append prmiSize  'M001a

        .Parameters.Append prmUserId
        .Parameters.Append prmiFormFieldId
        .Parameters.Append prmReturnValue

        .Execute

        iFormFieldId = .Parameters("@iFormFieldId")   'ID After Insert
        sSprocReturnVal = .Parameters("@iReturnCode")  

    End With
    %>
    <script language="vbscript">
        window.opener.location = "addFormCreator.asp?sid=<%=request.QueryString("iFormId")%>"
    </script>

    <%
end if[/CODE]

[QUOTE=adatapost;1180807][code]
If Not IsDBNull(objDataReader.GetString(12)) Then
...
End If
[/code][/QUOTE]
Tried this. Still get same error.

I can't get past this error in my loop through the data reader specifically dr(12). I tried adding .To String but that doesn't seem to work either. Can someone help me with what need to do so it can read even if there is a Null value. My code is below:

[CODE] While objDataReader.Read()
'Set up DataRow object
Dim dr As DataRow = DataReaderTable.NewRow

                        With dr
                            dr(0) = objDataReader.GetSqlInt32(0)    'IndividualID
                            dr(1) = objDataReader.GetString(1)      'First Name
                            dr(2) = objDataReader.GetString(2)      'Last Name
                            dr(3) = objDataReader.GetString(3)      'Email Address
                            dr(4) = objDataReader.GetString(4)      'Address 1
                            dr(5) = objDataReader.GetString(5)      'City
                            dr(6) = objDataReader.GetString(6)      'State
                            dr(7) = objDataReader.GetString(7)      'Post Code
                            dr(8) = objDataReader.GetString(8)      'Phone Number
                            dr(9) = objDataReader.GetString(9)      'Session Date
                            dr(10) = objDataReader.GetString(10)    'UpdateBy
                            dr(11) = objDataReader.GetSqlInt32(11)    'ProductID
                            dr(12) = objDataReader.GetString(12).ToString 'User7

                        End With
                        'Add row to existing dataTable
                        DataReaderTable.Rows.Add(dr)
                    End While

[/CODE]

I have a hyperlink column in a datagrid that uses DataNavigateUrlFormatString to open a popup window via javascript. I am trying to get two variables from a sql to show in the query string for the popup window. I am able to pass the sessionstart date which is ={0} but the other those two variables in the javascript I am not sure how to pass. The two are school_id and program_id in the select statement below:

[CODE] strsql = "select count(z.iIndividualid) as enrolled,session_id,school_id as SchoolId,program_id as ProgramId,convert(nvarchar(10),session_start_date,101) as SessionStartDate, session_class_size as SessionClassSize from dbo.cnSchoolProgramSessions cn with (nolock) left join customerproductdetail cpd on cn.session_start_date = cpd.dtdate1 left join customerproduct cp on cpd.iproductid=cp.iproductid and cp.iSiteId = cpd.iSiteId and cpd.tiRecordStatus = cp.tiRecordStatus left join individual z on z.iIndividualId = cp.iOwnerId And z.tiRecordStatus = cp.tiRecordStatus where record_status = 1 and school_id = '" & iSchool & "' and program_id = '" & iProgram & "' group by session_id, school_id, program_id,session_start_date,session_class_size[/CODE]

and the hyperlink column code in the data grid that is not working

[CODE] <asp:HyperLinkColumn HeaderStyle-BorderColor="Black" DataNavigateUrlField="sessionstartdate" HeaderStyle-BorderStyle ="Inset" ItemStyle-BorderColor = "Black" ItemStyle-BorderStyle="Inset" DataTextField="sessionstartdate" HeaderText="Session Class Date" DataNavigateUrlFormatString="javascript:var w=window.open('updsessiondate.aspx?sessionstartdate={0}&program=<%=strProgramID%>&school='&SchoolId&','','width=850,height=400');" /> [/CODE]

What do I need to pass in the hyperlink column to get the proper? Hopefully this makes sense to someone

Any ideas from anyone?

Unbelievable. No one has any ideas on this.

I have two datasets called ds and ds1 that I want to merge into a grid. I get data from the first dataset to display in the grid but the second dataset where I want to display a count I don't get any data from it. I am trying a ds.Merge(ds1). here is the code i have for the sub. What am I doing incorrectly? I need some assistance please

[CODE]Public Sub LoadSessionDateGrid(ByVal iSchool As Integer, ByVal iProgram As Integer)

  1. Try
  2. Me.Label1.Text = iSchool
  3. Me.Label2.Text = iProgram
  4. Dim ds As New DataSet()
  5. ds = New DataSet
  6. 'If Me.ddType.SelectedValue = "Status" Then
  7. strsql = "select session_id as SessionId,school_id as SchoolId,program_id as ProgramId,convert(nvarchar(10),session_start_date,101) as SessionstartDate, session_class_size as SessionClassSize from dbo.cnSchoolProgramSessions with (nolock) where record_status = 1 and school_id = '" & iSchool & "' and program_id = '" & iProgram & "'"
    1. onyxConnection.Open()
    2. Dim da As SqlDataAdapter = New SqlDataAdapter(strsql, onyxConnection)
    3. da.Fill(ds)
    4. 'Bind DataGrid from DataView
    5. 'strsql = "select z.iIndividualId,z.vchFirstName,z.vchLastName,z.vchEmailAddress,z.vchAddress1,z.vchCity,z.chRegionCode,dbo.cnfnFormatPostCode(z.vchPostCode) as PostCode,dbo.cnfnFormatUSPhone(z.vchPhoneNumber) as PhoneNumber,convert(nvarchar(10),cpd.dtDate1,101) as SessionstartDate from individual z with (nolock) inner join customerProduct cp with (nolock) on z.iIndividualId = cp.iOwnerId and z.tiRecordStatus = cp.tiRecordStatus and z.iSiteId = cp.iSiteId inner join customerProductDetail cpd with (nolock) on cp.iProductId = cpd.iProductId and cp.iSiteId = cpd.iSiteId and cp.tiRecordStatus = cpd.tiRecordStatus where z.tiRecordStatus = 1 and z.iSiteId = 1 and cpd.dtDate1 is not null and convert(nvarchar(10),cpd.dtDate1,101) = '" & sSessionDate & "' order by cpd.dtDate1"
    6. da.Dispose()
    7. 'strSql = "select contact.*, ...

Anyone with any ideas

I am trying to get a grand total from a shopping cart page and am not sure how to do that. I have the total that loops through each section but I want to display the grand total from all of those sections at the bottom of the page. Can someone offer assistance on how to do this. Here is my code:

[CODE]dim totalPrice(20) //The total price on any given subform //CONFIG - change this to the maximum number of product types you ever expect to have.
dim iQtys(20, 50) //CONFIG - Change this to the maximum number of items you ever expect to have on one order form.
dim emailTo, emailFrom, emailSubject
dim grandTotal(20)

    if Request.Form("btnCalculate.x") <> 0 or Request.Form("btnCalculate.y") <> 0  then
        isPostback = 1 'cInt(Request.Form("btnCalculate"))

        for iCntr2 = 1 to Request.Form("NumForms")

            for iCntr = 1 to Request.Form("NumElements" & iCntr2)

                iQtys(iCntr2, iCntr) = CInt(Request.Form("Qty" & iCntr2 & "_" & iCntr))
                totalPrice(iCntr2) = totalPrice(iCntr2) + (Ccur(Request.Form("UnitPrice" & iCntr2 & "_" & iCntr)) * CInt(Request.Form("Qty" & iCntr2 & "_" & iCntr)))

            next

        next

    end if

totalPrice(iCntr2) = totalPrice(iCntr2) + (Ccur(Request.Form("UnitPrice" & iCntr2 & "_" & iCntr)) * CInt(Request.Form("Qty" & iCntr2 & "_" & iCntr)))

    Response.write "<TR><TD align=left colspan=" & oProdInstances.Fields.Count - 2 & ">Grand Total:  " & FormatCurrency(grandTotal(iForm), 2) & "</TD>"

[/CODE]

I have a .asp page that is a map of the U.S. When you click on a state it brings up a pop menu. This page works fine on IE but not on Firefox. On Firefox when I click on the state it opens up another tab of the .asp page. How do I get this page to work in Firefox

I have included part of the code below

Here is a link to the page

[url]http://allos.dkpierce.net/[/url]

[CODE]<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/includes/common/KT_common.asp" -->
<!--#include virtual="/includes/tfi/TFI.asp" -->
<!--#include virtual="/includes/tso/TSO.asp" -->
<!--#include virtual="/includes/nav/NAV.asp" -->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<TITLE>Folotyn™ (pralatrexate) State-Specific Reimbursement Information</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<LINK HREF="/dkpweb/dk_style.css" REL="stylesheet" TYPE="text/css">
<STYLE>
.style2 {
font-size: 9
}
.style4 {font-size: xx-small}
.style5 {
font-size: 10px
}
</STYLE>
<STYLE TYPE="text/css">

contextMenu {position:absolute; background-color:#cfcfcf;
          border-style:solid; border-width:1px; 
          border-color:#EFEFEF #505050 #505050 #EFEFEF; 
          padding:3px 10px; font-size:10pt; font-family:Arial, Helvetica; 
          line-height:150%; visibility:hidden}

.menuItem {color:black}
.menuItemOn {color:white}
OL {list-style-position:inside; font-weight:bold; cursor:nw-resize}
LI {font-weight:normal}
</STYLE>

<script type="text/javascript">
function showContextMenu() {
contextMenu.setCapture()
contextMenu.style.pixelTop = event.clientY + document.body.scrollTop
contextMenu.style.pixelLeft = event.clientX + document.body.scrollLeft
contextMenu.style.visibility = "visible"
event.returnValue = false
}

function revert() {
document.releaseCapture()
hideMenu()
}
function hideMenu() {
contextMenu.style.visibility = "hidden"
}
function handleClick() {
var elem = window.event.srcElement
if (elem.id.indexOf("menuItem") == 0) {
objChild = window.open( elem.LISTTYPE + '?state=' + menuState);
}

revert()
event.cancelBubble = true

}
function highlight() {
var elem = event.srcElement
if (elem.className == "menuItem") {
elem.className = "menuItemOn"
}
}
function unhighlight() {
var elem = event.srcElement
if (elem.className == "menuItemOn") {
elem.className = "menuItem"
} ...

I need to know how and what steps to automate to backup a database on my production SQL server and restore that database in my test SQL server. The database exists in both servers currently. I want to set this up so it will run every day at a certain time. Does anyone know what I need to do for this.