Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Update panel with Gridview control

Reply
Thread Tools

Update panel with Gridview control

 
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-16-2009
I am getting the following error mesage from the label control on my aspx
files.

Error creating control:labeid not specified and here is the code below
I have two grids. The first grid shows a gridview with no ajax
functionality. The second grid shows ajax functionality. Any suggestions will
be appreciated. IF you need more info, I will send you a zipped file of the
solution.

<body>
<form id="frm" runat="server" >
<div style="margin-left:35px">
<asp:ScriptManager ID="scriptManager" runat="server" />
<asp:SqlDataSource
ID="sqldsCustomers" runat="server"
SelectCommand="select customerid, companyname, contactname,
contacttitle from dbo.[customers]"
SelectCommandType="Text"
ConnectionString="todo"
CancelSelectOnNullParameter="true" />

<p style="background-color:AliceBlue; width:95%">
Example of two customer GridViews, the top one is not ajax enabled
and sort or paging will cause the entire page to refresh. The bottom
GridView is ajax enabled and does not cause the complete page to rerender<br
/>
</p>
<asp:Label runat="server" Text="Customers - No AJAX"
BackColor="lightblue" Width="95%" />
<asp:GridView id="gvCustomersNoAJAX" runat="server"
DataSourceID="sqldsCustomers" AutoGenerateColumns="true" AllowPaging="true"
AllowSorting="true" PageSize="5" Width="95%">
<AlternatingRowStyle BackColor="aliceBlue" />
<HeaderStyle HorizontalAlign="Left" />
</asp:GridView>
<br />
<asp:UpdatePanel ID="updatePanel" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:Label runat="server" Text="Customers - With AJAX"
BackColor="lightblue" Width="95%" />
<asp:GridView id="gvCustomersWithAJAX" runat="server"
DataSourceID="sqldsCustomers"
AutoGenerateColumns="true" AllowPaging="true"
AllowSorting="true" PageSize="5" Width="95%">
<AlternatingRowStyle BackColor="aliceBlue" />
<HeaderStyle HorizontalAlign="Left" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<ajaxToolkit:UpdatePanelAnimationExtender ID="upae"
BehaviorID="animation" runat="server" TargetControlID="updatePanel">
<Animations>
<OnUpdating>
<Parallel duration="0">
<ScriptAction Script="onUpdating();" />
</Parallel>
</OnUpdating>
<OnUpdated>
<Parallel duration="0">
<ScriptAction Script="onUpdated();" />
</Parallel>
</OnUpdated>
</Animations>
</ajaxToolkit:UpdatePanelAnimationExtender>
<div id="updateProgressDiv" style="background-color:#CF4342;
display:none; position:absolute;">
<span style="color:#fff; margin:3px">Loading ...</span>
</div>
</div>
</form>
</body>
</html>


Thanks

Alex

 
Reply With Quote
 
 
 
 
Steven Cheng
Guest
Posts: n/a
 
      01-19-2009
Hi Alex,

Regarding on the problem you mentioned, I've performed some test with the
aspx markup you provided. Since you haven't provided script functions(and I
haven't your database), so I modified it to use my own database connection
and scription function. Except these changes, the page can work correctly.
Here is the modified markup I used for test.

You can have a look at my page and compare with yours to see whether there
is anything different. If necessary, I can also send you my test page.

===================================
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="WebApplication1._Default" %>


<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript">

function onUpdating()
{
document.getElementById("divMessage").innerHTML = "onUpdating!";
}

function onUpdated() {
document.getElementById("divMessage").innerHTML = "onUpdated!";
}

</script>
</head>
<body>
<form id="frm" runat="server" >
<div id="divMessage" style="font-sizex-large">

</div>
<hr />
<div style="margin-left:35px">
<asp:ScriptManager ID="scriptManager" runat="server" />
<asp:SqlDataSource
ID="sqldsCustomers" runat="server"
SelectCommand="SELECT [Name], [Close], [Code] FROM [Sheet1]"
ConnectionString="<%$ ConnectionStrings:testdbConnectionString
%>" />

<p style="background-color:AliceBlue; width:95%">
Example of two customer GridViews, the top one is not ajax enabled
and sort or paging will cause the entire page to refresh. The bottom
GridView is ajax enabled and does not cause the complete page to
rerender<br
/>
</p>
<asp:Label ID="Label1" runat="server" Text="Customers - No AJAX"
BackColor="lightblue" Width="95%" />
<asp:GridView id="gvCustomersNoAJAX" runat="server"
DataSourceID="sqldsCustomers" AutoGenerateColumns="False"
AllowPaging="True"
AllowSorting="True" PageSize="5" Width="95%">
<AlternatingRowStyle BackColor="aliceBlue" />
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name"
SortExpression="Name" />
<asp:BoundField DataField="Close" HeaderText="Close"
SortExpression="Close" />
<asp:BoundField DataField="Code" HeaderText="Code"
SortExpression="Code" />
</Columns>
<HeaderStyle HorizontalAlign="Left" />
</asp:GridView>
<br />
<asp:UpdatePanel ID="updatePanel" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Text="Customers -
With AJAX"
BackColor="lightblue" Width="95%" />
<asp:GridView id="gvCustomersWithAJAX" runat="server"
DataSourceID="sqldsCustomers"
AutoGenerateColumns="False" AllowPaging="True"
AllowSorting="True" PageSize="5" Width="95%">
<AlternatingRowStyle BackColor="aliceBlue" />
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name"
SortExpression="Name" />
<asp:BoundField DataField="Close"
HeaderText="Close" SortExpression="Close" />
<asp:BoundField DataField="Code" HeaderText="Code"
SortExpression="Code" />
</Columns>
<HeaderStyle HorizontalAlign="Left" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>


<ajaxToolkit:UpdatePanelAnimationExtender ID="upae"
BehaviorID="animation" runat="server" TargetControlID="updatePanel">
<Animations>
<OnUpdating>

<Parallel duration="0">
<ScriptAction Script="onUpdating();" />
</Parallel>
</OnUpdating>
<OnUpdated>
<Parallel duration="0">
<ScriptAction Script="onUpdated();" />
</Parallel>
</OnUpdated>
</Animations>
</ajaxToolkit:UpdatePanelAnimationExtender>



<div id="updateProgressDiv" style="background-color:#CF4342;
display:none; position:absolute;">
<span style="color:#fff; margin:3px">Loading ...</span>
</div>
</div>
</form>
</body>

</html>
==========================================

If there is anything need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

--------------------
>From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
>Subject: Update panel with Gridview control
>Date: Fri, 16 Jan 2009 11:27:01 -0800


>
>I am getting the following error mesage from the label control on my aspx
>files.
>
>Error creating control:labeid not specified and here is the code below
>I have two grids. The first grid shows a gridview with no ajax
>functionality. The second grid shows ajax functionality. Any suggestions

will
>be appreciated. IF you need more info, I will send you a zipped file of

the
>solution.
>
><body>
> <form id="frm" runat="server" >
> <>


 
Reply With Quote
 
 
 
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-19-2009
Steve,

Thanks for the response. I'll play with your code and update you of my
progress by Wednesday. I have always enjoyed your support.

""Steven Cheng"" wrote:

> Hi Alex,
>
> Regarding on the problem you mentioned, I've performed some test with the
> aspx markup you provided. Since you haven't provided script functions(and I
> haven't your database), so I modified it to use my own database connection
> and scription function. Except these changes, the page can work correctly.
> Here is the modified markup I used for test.
>
> You can have a look at my page and compare with yours to see whether there
> is anything different. If necessary, I can also send you my test page.
>
> ===================================
> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
> Inherits="WebApplication1._Default" %>
>
>
> <%@ Register Assembly="AjaxControlToolkit"
> Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title></title>
> <script type="text/javascript">
>
> function onUpdating()
> {
> document.getElementById("divMessage").innerHTML = "onUpdating!";
> }
>
> function onUpdated() {
> document.getElementById("divMessage").innerHTML = "onUpdated!";
> }
>
> </script>
> </head>
> <body>
> <form id="frm" runat="server" >
> <div id="divMessage" style="font-sizex-large">
>
> </div>
> <hr />
> <div style="margin-left:35px">
> <asp:ScriptManager ID="scriptManager" runat="server" />
> <asp:SqlDataSource
> ID="sqldsCustomers" runat="server"
> SelectCommand="SELECT [Name], [Close], [Code] FROM [Sheet1]"
> ConnectionString="<%$ ConnectionStrings:testdbConnectionString
> %>" />
>
> <p style="background-color:AliceBlue; width:95%">
> Example of two customer GridViews, the top one is not ajax enabled
> and sort or paging will cause the entire page to refresh. The bottom
> GridView is ajax enabled and does not cause the complete page to
> rerender<br
> />
> </p>
> <asp:Label ID="Label1" runat="server" Text="Customers - No AJAX"
> BackColor="lightblue" Width="95%" />
> <asp:GridView id="gvCustomersNoAJAX" runat="server"
> DataSourceID="sqldsCustomers" AutoGenerateColumns="False"
> AllowPaging="True"
> AllowSorting="True" PageSize="5" Width="95%">
> <AlternatingRowStyle BackColor="aliceBlue" />
> <Columns>
> <asp:BoundField DataField="Name" HeaderText="Name"
> SortExpression="Name" />
> <asp:BoundField DataField="Close" HeaderText="Close"
> SortExpression="Close" />
> <asp:BoundField DataField="Code" HeaderText="Code"
> SortExpression="Code" />
> </Columns>
> <HeaderStyle HorizontalAlign="Left" />
> </asp:GridView>
> <br />
> <asp:UpdatePanel ID="updatePanel" runat="server"
> UpdateMode="Conditional">
> <ContentTemplate>
> <asp:Label ID="Label2" runat="server" Text="Customers -
> With AJAX"
> BackColor="lightblue" Width="95%" />
> <asp:GridView id="gvCustomersWithAJAX" runat="server"
> DataSourceID="sqldsCustomers"
> AutoGenerateColumns="False" AllowPaging="True"
> AllowSorting="True" PageSize="5" Width="95%">
> <AlternatingRowStyle BackColor="aliceBlue" />
> <Columns>
> <asp:BoundField DataField="Name" HeaderText="Name"
> SortExpression="Name" />
> <asp:BoundField DataField="Close"
> HeaderText="Close" SortExpression="Close" />
> <asp:BoundField DataField="Code" HeaderText="Code"
> SortExpression="Code" />
> </Columns>
> <HeaderStyle HorizontalAlign="Left" />
> </asp:GridView>
> </ContentTemplate>
> </asp:UpdatePanel>
>
>
> <ajaxToolkit:UpdatePanelAnimationExtender ID="upae"
> BehaviorID="animation" runat="server" TargetControlID="updatePanel">
> <Animations>
> <OnUpdating>
>
> <Parallel duration="0">
> <ScriptAction Script="onUpdating();" />
> </Parallel>
> </OnUpdating>
> <OnUpdated>
> <Parallel duration="0">
> <ScriptAction Script="onUpdated();" />
> </Parallel>
> </OnUpdated>
> </Animations>
> </ajaxToolkit:UpdatePanelAnimationExtender>
>
>
>
> <div id="updateProgressDiv" style="background-color:#CF4342;
> display:none; position:absolute;">
> <span style="color:#fff; margin:3px">Loading ...</span>
> </div>
> </div>
> </form>
> </body>
>
> </html>
> ==========================================
>
> If there is anything need help, please feel free to post here.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>
> --------------------
> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >Subject: Update panel with Gridview control
> >Date: Fri, 16 Jan 2009 11:27:01 -0800

>
> >
> >I am getting the following error mesage from the label control on my aspx
> >files.
> >
> >Error creating control:labeid not specified and here is the code below
> >I have two grids. The first grid shows a gridview with no ajax
> >functionality. The second grid shows ajax functionality. Any suggestions

> will
> >be appreciated. IF you need more info, I will send you a zipped file of

> the
> >solution.
> >
> ><body>
> > <form id="frm" runat="server" >
> > <>

>
>

 
Reply With Quote
 
Steven Cheng
Guest
Posts: n/a
 
      01-20-2009
Thanks for your reply Alex,

If there is anything unclear, please feel free to let me know.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

--------------------
>From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
>Subject: RE: Update panel with Gridview control
>Date: Mon, 19 Jan 2009 12:54:04 -0800


>
>Steve,
>
>Thanks for the response. I'll play with your code and update you of my
>progress by Wednesday. I have always enjoyed your support.
>
>""Steven Cheng"" wrote:
>
>> Hi Alex,
>>
>> Regarding on the problem you mentioned, I've performed some test with

the
>> aspx markup you provided. Since you haven't provided script

functions(and I
>> haven't your database), so I modified it to use my own database

connection
>> and scription function. Except these changes, the page can work

correctly.
>> Here is the modified markup I used for test.
>>
>> You can have a look at my page and compare with yours to see whether

there
>> is anything different. If necessary, I can also send you my test page.
>>
>> ===================================
>> <%@ Page Language="C#" AutoEventWireup="true"

CodeBehind="Default.aspx.cs"
>> Inherits="WebApplication1._Default" %>
>>
>>
>> <%@ Register Assembly="AjaxControlToolkit"
>> Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
>>
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> <html xmlns="http://www.w3.org/1999/xhtml" >
>> <head runat="server">
>> <t


 
Reply With Quote
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-25-2009
Steve,

Thanks for all your code suggestions. I have added your code and just made
minor changes to jscript functions and the CustomerNoAjax.aspx page is
working just as expected. However, when I run the Triggers11.aspx page, I get
the error below. My goal is make the search button work without hard coding
the orderid as the author had done. Any suggestions will be admired. I will
email you my current working version. Also I am getting this minor error
label:ID property is not specified which I do not see why because in my
solution, I ahve defined the id property
Thanks

Server Error in '/in_depth_update_panel1' Application.
--------------------------------------------------------------------------------

Format of the initialization string does not conform to specification
starting at index 0.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.ArgumentException: Format of the initialization
string does not conform to specification starting at index 0.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

""Steven Cheng"" wrote:

> Thanks for your reply Alex,
>
> If there is anything unclear, please feel free to let me know.
>
> Hope this helps.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
> --------------------
> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >References: <(E-Mail Removed)>

> <(E-Mail Removed)>
> >Subject: RE: Update panel with Gridview control
> >Date: Mon, 19 Jan 2009 12:54:04 -0800

>
> >
> >Steve,
> >
> >Thanks for the response. I'll play with your code and update you of my
> >progress by Wednesday. I have always enjoyed your support.
> >
> >""Steven Cheng"" wrote:
> >
> >> Hi Alex,
> >>
> >> Regarding on the problem you mentioned, I've performed some test with

> the
> >> aspx markup you provided. Since you haven't provided script

> functions(and I
> >> haven't your database), so I modified it to use my own database

> connection
> >> and scription function. Except these changes, the page can work

> correctly.
> >> Here is the modified markup I used for test.
> >>
> >> You can have a look at my page and compare with yours to see whether

> there
> >> is anything different. If necessary, I can also send you my test page.
> >>
> >> ===================================
> >> <%@ Page Language="C#" AutoEventWireup="true"

> CodeBehind="Default.aspx.cs"
> >> Inherits="WebApplication1._Default" %>
> >>
> >>
> >> <%@ Register Assembly="AjaxControlToolkit"
> >> Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
> >>
> >>
> >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> >>
> >> <html xmlns="http://www.w3.org/1999/xhtml" >
> >> <head runat="server">
> >> <t

>
>

 
Reply With Quote
 
Steven Cheng
Guest
Posts: n/a
 
      01-27-2009
Hi Alex,

I've checked the project you sent me. Yes, I got the error when tried
running "trigger1.aspx". Based on the error message and callstack, I found
that the error occured during the database connection construction, see
callstack below

>>>>>>>>>>>>>>>>>>


[ArgumentException: Format of the initialization string does not conform to
specification starting at index 0.]
System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String
connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
useOdbcRules, String& keyname, String& keyvalue) +1242
System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable
parsetable, String connectionString, Boolean buildChain, Hashtable
synonyms, Boolean firstKey) +126
System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString,
Hashtable synonyms, Boolean useOdbcRules) +102
<<<<<<<<<<<<<<<<

So I checked the connectionString of the SqlDataSource control used on that
page and found that you haven't specified the correct connectionString
expression. Here is the original content:

======================
<asp:SqlDataSource
ID="sqldsOrderDetails" runat="server"
SelectCommand="select * from dbo.[order details] where
orderid=@orderid"
SelectCommandType="Text"
ConnectionString="todo"
OnSelecting="SqldsOrderDetails_Selecting"
CancelSelectOnNullParameter="true" />

<p style="background-color:AliceBlue; width:95%">
Example linking the UpdatePanel to a button outside of the panel
that triggers the asynchronous post-back using the AsyncPostBackTrigger<br
/>
</p>
===================

You need to change the connectionString to the correct one(pointing to
NorthWind database), like below:
==========================

<asp:SqlDataSource
ID="sqldsOrderDetails" runat="server"
SelectCommand="select * from dbo.[order details] where
orderid=@orderid"
SelectCommandType="Text"
ConnectionString="<%$
ConnectionStrings:NorthwindConnectionString %>"
OnSelecting="SqldsOrderDetails_Selecting"
CancelSelectOnNullParameter="true" />

<p style="background-color:AliceBlue; width:95%">
Example linking the UpdatePanel to a button outside of the panel
that triggers the asynchronous post-back using the AsyncPostBackTrigger<br
/>
</p>
=============================

Then, the page starts working.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
http://www.velocityreviews.com/forums/(E-Mail Removed).


--------------------
>From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
>Subject: RE: Update panel with Gridview control
>Date: Sat, 24 Jan 2009 16:21:01 -0800


>
>Steve,
>
>Thanks for all your code suggestions. I have added your code and just made
>minor changes to jscript functions and the CustomerNoAjax.aspx page is
>working just as expected. However, when I run the Triggers11.aspx page, I

get
>the error below. My goal is make the search button work without hard

coding
>the orderid as the author had done. Any suggestions will be admired. I

will
>email you my current working version. Also I am getting this minor error
>label:ID property is not specified which I do not see why because in my
>solution, I ahve defined the id property
>Thanks
>
>Server Error in '/in_depth_update_panel1' Application.

----------------------------------------------------------------------------
----
>
>Format of the initialization string does not conform to specification
>starting at index 0.
>Description: An unhandled exception occurred during the execution of the
>current web request. Please review the stack trace for more information

about
>the error and where it originated in the code.
>
>Exception Details: System.ArgumentException: Format of the initialization
>string does not conform to specification starting at index 0.
>
>Source Error:
>
>An unhandled exception was generated during the execution of the current

web
>request. Information regarding the origin and location of the exception

can
>be identified using the exception stack trace below.
>
>Stack Trace:
>
>""Steven Cheng"" wrote:
>
>> Thanks for your reply Alex,
>>
>> If there is anything unclear, please feel free to let me know.
>>
>> Hope this helps.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft


 
Reply With Quote
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-28-2009
Steve,

I have implemented your code changes and the search button is working for
orderid# entered. However, How do I tweak my code such that all records are
returned when no orderid# is entered. It looks like the change has has to be
at this line: and maybe adding & "*" but I am not sure. Any suggestions.


protected void SqldsOrderDetails_Selecting(object sender,
SqlDataSourceSelectingEventArgs args)
{
args.Command.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
}

""Steven Cheng"" wrote:

> Hi Alex,
>
> I've checked the project you sent me. Yes, I got the error when tried
> running "trigger1.aspx". Based on the error message and callstack, I found
> that the error occured during the database connection construction, see
> callstack below
>
> >>>>>>>>>>>>>>>>>>

>
> [ArgumentException: Format of the initialization string does not conform to
> specification starting at index 0.]
> System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String
> connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
> useOdbcRules, String& keyname, String& keyvalue) +1242
> System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable
> parsetable, String connectionString, Boolean buildChain, Hashtable
> synonyms, Boolean firstKey) +126
> System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString,
> Hashtable synonyms, Boolean useOdbcRules) +102
> <<<<<<<<<<<<<<<<
>
> So I checked the connectionString of the SqlDataSource control used on that
> page and found that you haven't specified the correct connectionString
> expression. Here is the original content:
>
> ======================
> <asp:SqlDataSource
> ID="sqldsOrderDetails" runat="server"
> SelectCommand="select * from dbo.[order details] where
> orderid=@orderid"
> SelectCommandType="Text"
> ConnectionString="todo"
> OnSelecting="SqldsOrderDetails_Selecting"
> CancelSelectOnNullParameter="true" />
>
> <p style="background-color:AliceBlue; width:95%">
> Example linking the UpdatePanel to a button outside of the panel
> that triggers the asynchronous post-back using the AsyncPostBackTrigger<br
> />
> </p>
> ===================
>
> You need to change the connectionString to the correct one(pointing to
> NorthWind database), like below:
> ==========================
>
> <asp:SqlDataSource
> ID="sqldsOrderDetails" runat="server"
> SelectCommand="select * from dbo.[order details] where
> orderid=@orderid"
> SelectCommandType="Text"
> ConnectionString="<%$
> ConnectionStrings:NorthwindConnectionString %>"
> OnSelecting="SqldsOrderDetails_Selecting"
> CancelSelectOnNullParameter="true" />
>
> <p style="background-color:AliceBlue; width:95%">
> Example linking the UpdatePanel to a button outside of the panel
> that triggers the asynchronous post-back using the AsyncPostBackTrigger<br
> />
> </p>
> =============================
>
> Then, the page starts working.
>
> Hope this helps.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
>
> --------------------
> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >References: <(E-Mail Removed)>

> <(E-Mail Removed)>
> <(E-Mail Removed)>
> <(E-Mail Removed)>
> >Subject: RE: Update panel with Gridview control
> >Date: Sat, 24 Jan 2009 16:21:01 -0800

>
> >
> >Steve,
> >
> >Thanks for all your code suggestions. I have added your code and just made
> >minor changes to jscript functions and the CustomerNoAjax.aspx page is
> >working just as expected. However, when I run the Triggers11.aspx page, I

> get
> >the error below. My goal is make the search button work without hard

> coding
> >the orderid as the author had done. Any suggestions will be admired. I

> will
> >email you my current working version. Also I am getting this minor error
> >label:ID property is not specified which I do not see why because in my
> >solution, I ahve defined the id property
> >Thanks
> >
> >Server Error in '/in_depth_update_panel1' Application.

> ----------------------------------------------------------------------------
> ----
> >
> >Format of the initialization string does not conform to specification
> >starting at index 0.
> >Description: An unhandled exception occurred during the execution of the
> >current web request. Please review the stack trace for more information

> about
> >the error and where it originated in the code.
> >
> >Exception Details: System.ArgumentException: Format of the initialization
> >string does not conform to specification starting at index 0.
> >
> >Source Error:
> >
> >An unhandled exception was generated during the execution of the current

> web
> >request. Information regarding the origin and location of the exception

> can
> >be identified using the exception stack trace below.
> >
> >Stack Trace:
> >
> >""Steven Cheng"" wrote:
> >
> >> Thanks for your reply Alex,
> >>
> >> If there is anything unclear, please feel free to let me know.
> >>
> >> Hope this helps.
> >>
> >> Sincerely,
> >>
> >> Steven Cheng
> >>
> >> Microsoft

>
>

 
Reply With Quote
 
Steven Cheng
Guest
Posts: n/a
 
      01-30-2009
Thanks for your followup Alex,

Glad to hear that you've got further progress on this.

Regarding on your new questions(deal with empty input parameter of the
TextBox), there are two ideas come up to my mind:

1. You can put the GridView into a panel ,and another GridView(within a
separate panel) on the page. And you can make either one of them visible
depend on the Value in TextBox(whether it is empty or not). And one of the
GridView will alway manually query all the records from table. Also, to
improve performance, you can only perform databinding manually(for that
gridview which display all records) when the TextBox is empty.


2. change the SQL select statement of the SqlDAtaSource control you used.
Add an additinal parameter to control whether it will return all the
records or not:

e.g.

=============================
<asp:SqlDataSource
ID="sqldsOrderDetails" runat="server"
SelectCommand="select * from dbo.[order details] where
orderid=@orderid OR 1 = @display_all"

.................... />



protected void SqldsOrderDetails_Selecting(object sender,
SqlDataSourceSelectingEventArgs args)
{
args.Command.Parameters.Add(new
System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));

System.Data.SqlClient.SqlParameter parameter = new
System.Data.SqlClient.SqlParameter("@display_all",
System.Data.SqlDbType.Bit);
if (string.IsNullOrEmpty(txtOrderID.Text.Trim()))
{
parameter.Value = 1;
}
else
{
parameter.Value = 0;
}

args.Command.Parameters.Add(parameter);
}
==============================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

--------------------
>From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
>Subject: RE: Update panel with Gridview control
>Date: Wed, 28 Jan 2009 12:10:03 -0800


>
>Steve,
>
>I have implemented your code changes and the search button is working for
>orderid# entered. However, How do I tweak my code such that all records

are
>returned when no orderid# is entered. It looks like the change has has to

be
>at this line: and maybe adding & "*" but I am not sure. Any suggestions.
>
>
>protected void SqldsOrderDetails_Selecting(object sender,
>SqlDataSourceSelectingEventArgs args)
> {
> args.Command.Parameters.Add(new
>System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
> }
>
>""Steven Cheng"" wrote:
>
>> Hi Alex,
>>
>> I've checked the project you sent me. Yes, I got the error when tried
>> running "trigger1.aspx". Based on the error message and callstack, I

found
>> that the error occured during the database connection construction, see
>> callstack below
>>
>> >>>>>>>>>>>>>>>>>>

>>
>> [ArgumentException: Format of the initialization string does not conform

to
>> specification starting at index 0.]
>> System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String
>> connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
>> useOdbcRules, String& keyname, String& keyvalue) +1242
>> System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable
>> parsetable, String connectionString, Boolean buildChain, Hashtable
>> synonyms, Boolean firstKey) +126
>> System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString,
>> Hashtable synonyms, Boolean useOdbcRules) +102
>> <<<<<<<<<<<<<<<<
>>
>> So I checked the connectionString of the SqlDataSource control used on

that
>> page and found that you haven't specified the correct connectionString
>> expression. Here is the original content:
>>
>> ======================
>> <asp:SqlDataSource
>> ID="sqldsOrderDetails" runat="server"
>> SelectCommand="select * from dbo.[order details] where
>> orderid=@orderid"
>> SelectCommandType="Text"
>> ConnectionString="todo"
>> OnSelecting="SqldsOrderDetails_Selecting"
>> CancelSelectOnNullParameter="true" />
>>
>> <p style="background-color:AliceBlue; width:95%">
>> Example linking the UpdatePanel to a button outside of the panel
>> that triggers the asynchronous post-back using the

AsyncPostBackTrigger<br
>> />
>> </p>
>> ===================
>>
>> You need to change the connectionString to the correct one(pointing to
>> NorthWind database), like below:
>> ==========================
>>
>> <asp:SqlDataSource
>> ID="sqldsOrderDetails" runat="server"
>> SelectCommand="select * from dbo.[order details] where
>> orderid=@orderid"
>> SelectCommandType="Text"
>> ConnectionString="<%$
>> ConnectionStrings:NorthwindConnectionString %>"
>> OnSelecting="SqldsOrderDetails_Selecting"
>> CancelSelectOnNullParameter="true" />
>>
>> <p style="background-color:AliceBlue; width:95%">
>> Example linking the UpdatePanel to a button outside of the panel
>> that triggers the asynchronous post-back using the

AsyncPostBackTrigger<br
>> />
>> </p>
>> =============================
>>
>> Then, the page starts working.
>>
>> Hope this helps.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> Delighting our customers is our #1 priority. We welcome your comments

and
>> suggestions about how we can improve the support we provide to you.

Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> (E-Mail Removed).
>>
>>
>> --------------------
>> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
>> >References: <(E-Mail Removed)>

>> <(E-Mail Removed)>
>> <(E-Mail Removed)>
>> <(E-Mail Removed)>
>> >Subject: RE: Update panel with Gridview control
>> >Date: Sat, 24 Jan 2009 16:21:01 -0800

>>
>> >
>> >Steve,
>> >
>> >Thanks for all your code suggestions. I have added your code and just

made
>> >minor changes to jscript functions and the CustomerNoAjax.aspx page is
>> >working just as expected. However, when I run the Triggers11.aspx page,

I
>> get
>> >the error below. My goal is make the search button work without hard

>> coding
>> >the orderid as the author had done. Any suggestions will be admired. I

>> will
>> >email you my current working version. Also I am getting this minor

error
>> >label:ID property is not specified which I do not see why because in my
>> >solution, I ahve defined the id property
>> >Thanks
>> >
>> >Server Error in '/in_depth_update_panel1' Application.

>>

----------------------------------------------------------------------------
>> ----
>> >
>> >Format of the initialization string does not conform to specification
>> >starting at index 0.
>> >Description: An unhandled exception occurred during the execution of

the
>> >current web request. Please review the stack trace for more information

>> about
>> >the error and where it originated in the code.
>> >
>> >Exception Details: System.ArgumentException: Format of the

initialization
>> >string does not conform to specification starting at index 0.
>> >
>> >Source Error:
>> >
>> >An unhandled exception was generated during the execution of the

current
>> web
>> >request. Information regarding the origin and location of the exception

>> can
>> >be identified using the exception stack trace below.
>> >
>> >Stack Trace:
>> >
>> >""Steven Cheng"" wrote:
>> >
>> >> Thanks for your reply Alex,
>> >>
>> >> If there is anything unclear, please feel free to let me know.
>> >>
>> >> Hope this helps.
>> >>
>> >> Sincerely,
>> >>
>> >> Steven Cheng
>> >>
>> >> Microsoft

>>
>>

>


 
Reply With Quote
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-30-2009
Steve,

Thanks for the response. I will implement your code suggstions and update
you by Monday. I appreciate all your support.

""Steven Cheng"" wrote:

> Thanks for your followup Alex,
>
> Glad to hear that you've got further progress on this.
>
> Regarding on your new questions(deal with empty input parameter of the
> TextBox), there are two ideas come up to my mind:
>
> 1. You can put the GridView into a panel ,and another GridView(within a
> separate panel) on the page. And you can make either one of them visible
> depend on the Value in TextBox(whether it is empty or not). And one of the
> GridView will alway manually query all the records from table. Also, to
> improve performance, you can only perform databinding manually(for that
> gridview which display all records) when the TextBox is empty.
>
>
> 2. change the SQL select statement of the SqlDAtaSource control you used.
> Add an additinal parameter to control whether it will return all the
> records or not:
>
> e.g.
>
> =============================
> <asp:SqlDataSource
> ID="sqldsOrderDetails" runat="server"
> SelectCommand="select * from dbo.[order details] where
> orderid=@orderid OR 1 = @display_all"
>
> .................... />
>
>
>
> protected void SqldsOrderDetails_Selecting(object sender,
> SqlDataSourceSelectingEventArgs args)
> {
> args.Command.Parameters.Add(new
> System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
>
> System.Data.SqlClient.SqlParameter parameter = new
> System.Data.SqlClient.SqlParameter("@display_all",
> System.Data.SqlDbType.Bit);
> if (string.IsNullOrEmpty(txtOrderID.Text.Trim()))
> {
> parameter.Value = 1;
> }
> else
> {
> parameter.Value = 0;
> }
>
> args.Command.Parameters.Add(parameter);
> }
> ==============================
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> --------------------
> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >Subject: RE: Update panel with Gridview control
> >Date: Wed, 28 Jan 2009 12:10:03 -0800

>
> >
> >Steve,
> >
> >I have implemented your code changes and the search button is working for
> >orderid# entered. However, How do I tweak my code such that all records

> are
> >returned when no orderid# is entered. It looks like the change has has to

> be
> >at this line: and maybe adding & "*" but I am not sure. Any suggestions.
> >
> >
> >protected void SqldsOrderDetails_Selecting(object sender,
> >SqlDataSourceSelectingEventArgs args)
> > {
> > args.Command.Parameters.Add(new
> >System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
> > }
> >
> >""Steven Cheng"" wrote:
> >
> >> Hi Alex,
> >>
> >> I've checked the project you sent me. Yes, I got the error when tried
> >> running "trigger1.aspx". Based on the error message and callstack, I

> found
> >> that the error occured during the database connection construction, see
> >> callstack below
> >>
> >> >>>>>>>>>>>>>>>>>>
> >>
> >> [ArgumentException: Format of the initialization string does not conform

> to
> >> specification starting at index 0.]
> >> System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String
> >> connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
> >> useOdbcRules, String& keyname, String& keyvalue) +1242
> >> System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable
> >> parsetable, String connectionString, Boolean buildChain, Hashtable
> >> synonyms, Boolean firstKey) +126
> >> System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString,
> >> Hashtable synonyms, Boolean useOdbcRules) +102
> >> <<<<<<<<<<<<<<<<
> >>
> >> So I checked the connectionString of the SqlDataSource control used on

> that
> >> page and found that you haven't specified the correct connectionString
> >> expression. Here is the original content:
> >>
> >> ======================
> >> <asp:SqlDataSource
> >> ID="sqldsOrderDetails" runat="server"
> >> SelectCommand="select * from dbo.[order details] where
> >> orderid=@orderid"
> >> SelectCommandType="Text"
> >> ConnectionString="todo"
> >> OnSelecting="SqldsOrderDetails_Selecting"
> >> CancelSelectOnNullParameter="true" />
> >>
> >> <p style="background-color:AliceBlue; width:95%">
> >> Example linking the UpdatePanel to a button outside of the panel
> >> that triggers the asynchronous post-back using the

> AsyncPostBackTrigger<br
> >> />
> >> </p>
> >> ===================
> >>
> >> You need to change the connectionString to the correct one(pointing to
> >> NorthWind database), like below:
> >> ==========================
> >>
> >> <asp:SqlDataSource
> >> ID="sqldsOrderDetails" runat="server"
> >> SelectCommand="select * from dbo.[order details] where
> >> orderid=@orderid"
> >> SelectCommandType="Text"
> >> ConnectionString="<%$
> >> ConnectionStrings:NorthwindConnectionString %>"
> >> OnSelecting="SqldsOrderDetails_Selecting"
> >> CancelSelectOnNullParameter="true" />
> >>
> >> <p style="background-color:AliceBlue; width:95%">
> >> Example linking the UpdatePanel to a button outside of the panel
> >> that triggers the asynchronous post-back using the

> AsyncPostBackTrigger<br
> >> />
> >> </p>
> >> =============================
> >>
> >> Then, the page starts working.
> >>
> >> Hope this helps.
> >>
> >> Sincerely,
> >>
> >> Steven Cheng
> >>
> >> Microsoft MSDN Online Support Lead
> >>
> >>
> >> Delighting our customers is our #1 priority. We welcome your comments

> and
> >> suggestions about how we can improve the support we provide to you.

> Please
> >> feel free to let my manager know what you think of the level of service
> >> provided. You can send feedback directly to my manager at:
> >> (E-Mail Removed).
> >>
> >>
> >> --------------------
> >> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >> >References: <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> >Subject: RE: Update panel with Gridview control
> >> >Date: Sat, 24 Jan 2009 16:21:01 -0800
> >>
> >> >
> >> >Steve,
> >> >
> >> >Thanks for all your code suggestions. I have added your code and just

> made
> >> >minor changes to jscript functions and the CustomerNoAjax.aspx page is
> >> >working just as expected. However, when I run the Triggers11.aspx page,

> I
> >> get
> >> >the error below. My goal is make the search button work without hard
> >> coding
> >> >the orderid as the author had done. Any suggestions will be admired. I
> >> will
> >> >email you my current working version. Also I am getting this minor

> error
> >> >label:ID property is not specified which I do not see why because in my
> >> >solution, I ahve defined the id property
> >> >Thanks
> >> >
> >> >Server Error in '/in_depth_update_panel1' Application.
> >>

> ----------------------------------------------------------------------------
> >> ----
> >> >
> >> >Format of the initialization string does not conform to specification
> >> >starting at index 0.
> >> >Description: An unhandled exception occurred during the execution of

> the
> >> >current web request. Please review the stack trace for more information
> >> about
> >> >the error and where it originated in the code.
> >> >
> >> >Exception Details: System.ArgumentException: Format of the

> initialization
> >> >string does not conform to specification starting at index 0.
> >> >
> >> >Source Error:
> >> >
> >> >An unhandled exception was generated during the execution of the

> current
> >> web
> >> >request. Information regarding the origin and location of the exception
> >> can
> >> >be identified using the exception stack trace below.
> >> >
> >> >Stack Trace:
> >> >
> >> >""Steven Cheng"" wrote:
> >> >
> >> >> Thanks for your reply Alex,
> >> >>
> >> >> If there is anything unclear, please feel free to let me know.
> >> >>
> >> >> Hope this helps.
> >> >>
> >> >> Sincerely,
> >> >>
> >> >> Steven Cheng
> >> >>
> >> >> Microsoft
> >>
> >>

> >

>
>

 
Reply With Quote
 
Alex. O. Koranteng
Guest
Posts: n/a
 
      01-30-2009
Steve,

Thanks for your response. I will implement your code changes and update you
by Monday. I really appreciate your support immensely.

Alex

""Steven Cheng"" wrote:

> Thanks for your followup Alex,
>
> Glad to hear that you've got further progress on this.
>
> Regarding on your new questions(deal with empty input parameter of the
> TextBox), there are two ideas come up to my mind:
>
> 1. You can put the GridView into a panel ,and another GridView(within a
> separate panel) on the page. And you can make either one of them visible
> depend on the Value in TextBox(whether it is empty or not). And one of the
> GridView will alway manually query all the records from table. Also, to
> improve performance, you can only perform databinding manually(for that
> gridview which display all records) when the TextBox is empty.
>
>
> 2. change the SQL select statement of the SqlDAtaSource control you used.
> Add an additinal parameter to control whether it will return all the
> records or not:
>
> e.g.
>
> =============================
> <asp:SqlDataSource
> ID="sqldsOrderDetails" runat="server"
> SelectCommand="select * from dbo.[order details] where
> orderid=@orderid OR 1 = @display_all"
>
> .................... />
>
>
>
> protected void SqldsOrderDetails_Selecting(object sender,
> SqlDataSourceSelectingEventArgs args)
> {
> args.Command.Parameters.Add(new
> System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
>
> System.Data.SqlClient.SqlParameter parameter = new
> System.Data.SqlClient.SqlParameter("@display_all",
> System.Data.SqlDbType.Bit);
> if (string.IsNullOrEmpty(txtOrderID.Text.Trim()))
> {
> parameter.Value = 1;
> }
> else
> {
> parameter.Value = 0;
> }
>
> args.Command.Parameters.Add(parameter);
> }
> ==============================
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> (E-Mail Removed).
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subs...#notifications.
>
> --------------------
> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >Subject: RE: Update panel with Gridview control
> >Date: Wed, 28 Jan 2009 12:10:03 -0800

>
> >
> >Steve,
> >
> >I have implemented your code changes and the search button is working for
> >orderid# entered. However, How do I tweak my code such that all records

> are
> >returned when no orderid# is entered. It looks like the change has has to

> be
> >at this line: and maybe adding & "*" but I am not sure. Any suggestions.
> >
> >
> >protected void SqldsOrderDetails_Selecting(object sender,
> >SqlDataSourceSelectingEventArgs args)
> > {
> > args.Command.Parameters.Add(new
> >System.Data.SqlClient.SqlParameter("@orderid", this.txtOrderID.Text));
> > }
> >
> >""Steven Cheng"" wrote:
> >
> >> Hi Alex,
> >>
> >> I've checked the project you sent me. Yes, I got the error when tried
> >> running "trigger1.aspx". Based on the error message and callstack, I

> found
> >> that the error occured during the database connection construction, see
> >> callstack below
> >>
> >> >>>>>>>>>>>>>>>>>>
> >>
> >> [ArgumentException: Format of the initialization string does not conform

> to
> >> specification starting at index 0.]
> >> System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String
> >> connectionString, Int32 currentPosition, StringBuilder buffer, Boolean
> >> useOdbcRules, String& keyname, String& keyvalue) +1242
> >> System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable
> >> parsetable, String connectionString, Boolean buildChain, Hashtable
> >> synonyms, Boolean firstKey) +126
> >> System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString,
> >> Hashtable synonyms, Boolean useOdbcRules) +102
> >> <<<<<<<<<<<<<<<<
> >>
> >> So I checked the connectionString of the SqlDataSource control used on

> that
> >> page and found that you haven't specified the correct connectionString
> >> expression. Here is the original content:
> >>
> >> ======================
> >> <asp:SqlDataSource
> >> ID="sqldsOrderDetails" runat="server"
> >> SelectCommand="select * from dbo.[order details] where
> >> orderid=@orderid"
> >> SelectCommandType="Text"
> >> ConnectionString="todo"
> >> OnSelecting="SqldsOrderDetails_Selecting"
> >> CancelSelectOnNullParameter="true" />
> >>
> >> <p style="background-color:AliceBlue; width:95%">
> >> Example linking the UpdatePanel to a button outside of the panel
> >> that triggers the asynchronous post-back using the

> AsyncPostBackTrigger<br
> >> />
> >> </p>
> >> ===================
> >>
> >> You need to change the connectionString to the correct one(pointing to
> >> NorthWind database), like below:
> >> ==========================
> >>
> >> <asp:SqlDataSource
> >> ID="sqldsOrderDetails" runat="server"
> >> SelectCommand="select * from dbo.[order details] where
> >> orderid=@orderid"
> >> SelectCommandType="Text"
> >> ConnectionString="<%$
> >> ConnectionStrings:NorthwindConnectionString %>"
> >> OnSelecting="SqldsOrderDetails_Selecting"
> >> CancelSelectOnNullParameter="true" />
> >>
> >> <p style="background-color:AliceBlue; width:95%">
> >> Example linking the UpdatePanel to a button outside of the panel
> >> that triggers the asynchronous post-back using the

> AsyncPostBackTrigger<br
> >> />
> >> </p>
> >> =============================
> >>
> >> Then, the page starts working.
> >>
> >> Hope this helps.
> >>
> >> Sincerely,
> >>
> >> Steven Cheng
> >>
> >> Microsoft MSDN Online Support Lead
> >>
> >>
> >> Delighting our customers is our #1 priority. We welcome your comments

> and
> >> suggestions about how we can improve the support we provide to you.

> Please
> >> feel free to let my manager know what you think of the level of service
> >> provided. You can send feedback directly to my manager at:
> >> (E-Mail Removed).
> >>
> >>
> >> --------------------
> >> >From: =?Utf-8?B?QWxleC4gTy4gS29yYW50ZW5n?= <(E-Mail Removed)>
> >> >References: <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> <(E-Mail Removed)>
> >> >Subject: RE: Update panel with Gridview control
> >> >Date: Sat, 24 Jan 2009 16:21:01 -0800
> >>
> >> >
> >> >Steve,
> >> >
> >> >Thanks for all your code suggestions. I have added your code and just

> made
> >> >minor changes to jscript functions and the CustomerNoAjax.aspx page is
> >> >working just as expected. However, when I run the Triggers11.aspx page,

> I
> >> get
> >> >the error below. My goal is make the search button work without hard
> >> coding
> >> >the orderid as the author had done. Any suggestions will be admired. I
> >> will
> >> >email you my current working version. Also I am getting this minor

> error
> >> >label:ID property is not specified which I do not see why because in my
> >> >solution, I ahve defined the id property
> >> >Thanks
> >> >
> >> >Server Error in '/in_depth_update_panel1' Application.
> >>

> ----------------------------------------------------------------------------
> >> ----
> >> >
> >> >Format of the initialization string does not conform to specification
> >> >starting at index 0.
> >> >Description: An unhandled exception occurred during the execution of

> the
> >> >current web request. Please review the stack trace for more information
> >> about
> >> >the error and where it originated in the code.
> >> >
> >> >Exception Details: System.ArgumentException: Format of the

> initialization
> >> >string does not conform to specification starting at index 0.
> >> >
> >> >Source Error:
> >> >
> >> >An unhandled exception was generated during the execution of the

> current
> >> web
> >> >request. Information regarding the origin and location of the exception
> >> can
> >> >be identified using the exception stack trace below.
> >> >
> >> >Stack Trace:
> >> >
> >> >""Steven Cheng"" wrote:
> >> >
> >> >> Thanks for your reply Alex,
> >> >>
> >> >> If there is anything unclear, please feel free to let me know.
> >> >>
> >> >> Hope this helps.
> >> >>
> >> >> Sincerely,
> >> >>
> >> >> Steven Cheng
> >> >>
> >> >> Microsoft
> >>
> >>

> >

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to really disable Java Update check when there is NO "Update" tab in Control Panel? Sven Fischer Java 0 10-22-2012 07:54 AM
Missing Java Control Panel in START menu->Control Panel: Diff javacpl.cpl and javacpl.exe? Robin Wenger Java 0 08-18-2011 06:38 AM
Why is there no "Java Control Panel" for J2EE v5upd14 ? Reinstall Java Control Panel possible? Ulf Meinhardt Java 0 07-07-2009 08:38 AM
Gridview doesn't update while panel.visable = false Kivak Wolf ASP .Net 0 06-19-2009 03:58 AM
Update panel with Gridview control using blank values in textbox Alex. O. Koranteng ASP .Net 8 02-13-2009 04:17 AM



Advertisments