Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Wednesday, March 28, 2012

asp.net Ajax MaskedEditExtender

I am trying to use a MaskedEditExtender in a Gridview, with a Date/Time Template Field.

When i enable the Extender, then when i choose to edit the row, nothing appears. As soon as i Disable the extender than the edit boxes appear.

Any ideas?

<cc1:MaskedEditExtenderID="MaskedEditExtender3"runat="server"MaskType="DateTime"AcceptAMPM="true"

AutoComplete="true"ClearTextOnInvalid="true"mask="99/99/9999 99:99:99"

Enabled="False"TargetControlID="TextBox1">

Hi Kevers,

To see the effect, MaskedEditExtender's Enabled is set to "true". Here is a sample which you can reference to.

<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField> <ItemTemplate> 2007-10-04 10:20:30 </ItemTemplate> <EditItemTemplate><asp:TextBox ID="TextBox1" runat="server" Text="10/04/2007 10:20:30"></asp:TextBox> <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Mask="99/99/9999 99:99:99" MaskType="DateTime" TargetControlID="TextBox1" AcceptAMPM="true"AutoComplete="true" ClearTextOnInvalid="true" Enabled="true"> </ajaxToolkit:MaskedEditExtender> </EditItemTemplate> </asp:TemplateField> </Columns> </asp:GridView><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title] FROM [Employees]" DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = @.EmployeeID" InsertCommand="INSERT INTO [Employees] ([LastName], [FirstName], [Title]) VALUES (@.LastName, @.FirstName, @.Title)" UpdateCommand="UPDATE [Employees] SET [LastName] = @.LastName, [FirstName] = @.FirstName, [Title] = @.Title WHERE [EmployeeID] = @.EmployeeID"> <DeleteParameters> <asp:Parameter Name="EmployeeID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="EmployeeID" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="Title" Type="String" /> </InsertParameters> </asp:SqlDataSource> </form>

I hope this help.

Best regards,

Jonathan

Saturday, March 24, 2012

ASP.NET 2.0 and Atlas vs. PHP

Hello,
I'm an ASP newbie and I have been using PHP + MySQL for the longest time. I am intrigued with this new Atlas product and I was just wondering what are some of the things that Atlas + ASP 2.0 can accomplish that PHP is not capable of. Thank you!!!You can think of ASP.NET and PHP as being equal -- both allow you to develop webpages. Atlas is simply a Microsoft framework for AJAX designed to work with ASP.NET. I'm sure there are AJAX components for PHP out there being used since AJAX is nothing but a way to allow client callback features to avoid postback and to add many "fancy" features that allow webpages to behave much like thick-client applications.

Here is a pointer to a few good online videos you might want to check out that shows more about ASP.NET as well as Atlas:http://weblogs.asp.net/scottgu/archive/2006/02/26/439088.aspx

Hope this helps,

Scott

ASP.NET 2.0 AJAX Extensions 1.0 install problem

Every time I try to install I get the following error:

ASP.NET 2.0 AJAX Extensions 1.0 Setup Wizard ended prematurely.

Microsoft ASP.NET 2.0 AJAX Extensions 1.0 Setup Wizard
ended prematurely because of an error. Your system has
not been modified. To install this program at a later time, run
the Setup Wizard again.

Click the Finish button to exit the Setup Wizard.

I have never had a previous copy installed. I am running Windows XP Professional Service Pack 2, Visual Studio Professional 2005, Framework 2.0.

I have every update installed and no matter what I do I keep getting the same error message.

Any Ideas?

The install fails with:

ExecNetFx: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
ExecNetFx: Error 0x8007006d: failed to allocate output string
ExecNetFx: Error 0xffffffff: Command line returned an error.
ExecNetFx: Error 0xffffffff: failed to execute Ngen command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe install "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"


Problem Solved!

This is a very bad way to fix the problem but it worked.

I ran the install and hit cancel after the files had all been copied. At this point it asked me if I really wanted to cancel. Before I answered, I copied the folder "Program Files\Microsoft ASP.NET" to another location on my hard drive". I then answered yes, and it deleted every thing.

I then copied the folder "Program Files\Microsoft ASP.NET" back.

At this point I used Control Panel->Administrative Tools->Microsoft .NET Framework 2.0 Configuration to add the three .dll files in the folder to the assembly cache.

I ran the install package and it worked.


Excellent solution. I was trying hard to ind a way to the same problem. This solution worked fine with me too.

Great job.

Tiru


Excellent solution. I was trying hard to ind a way to the same problem. This solution worked fine with me too.

Great job.

Tiru


Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Thanks computergeek - saved my bacon, thanks for bothering to post.

Wednesday, March 21, 2012

ASP .NET Infragistics AJAX Broken?

Hi,

I appreciate your time in helping with this problem.

source code can be found athttp://www.ryanupton.com/WebSiteTest2Userclick.zip

DESCRIPTION IN BRIEF

We have set up a Web-based form using 1 drop down selector(Infragistics seachcombo), and a submit button (Infragistics WebImageButton), a WebPanel (Infragistics WebPanel) , a refresh panel (Infragistics WebAsyncRefreshPanel)and excel exporter (Infragistics UltraWebGridExcelExporter) that uses the values the user selects in the above mentioned controls to seed a query.

The query is then run against the database and the results displayed in the Intragistics Ultragrid

What we would expect is that upon selecting different parameters and hitting submit the display would update with the new result set. What we do see is results seem to persist in the Ultragrid control until the user starts to interact with the control via the slider or hit the submit button a second time.

We think that one possible cause is that the control is somehow caching the prev resultset in any case it does not respond in timely fashion.

DETAILED DESCRIPTION

The selector individually populates a class which is stored in the session using the session command

The User then presses the submit button. The submit button grabs the global session data and then populates the Infragistics Ultragrid control using mysql data and displays the data in a heiracheral form. The Ultragrid is set to XML and Load on demand XML.

This program works perfectly with one user on the server.

The size of the data and per the four brand tables is parent 1019 rows, child 5161, gndchild 48140 rows and ggchild 185937 rows

The existing setup is 4 computers,

Server 1 DATA : One Fedora Linux server Linux version 2.6.20-1.2952.fc6 runing MYSQL Ver 14.12 Distrib 5.0.27, for redhat-linux-gnu (i686) using readline 5.0 this stores the data Intel(R) Pentium(R) 4 CPU 3.40GHz

SERVER 2 HTML : One Windows XP Professional Version 2002 SP2 P4 3G 2G RAM IIS Internet Information Services Microsoft Corporation Version: 5.1 Running VS2005 Infragistics NetAdvantage for .NET 2007 Vol. 2 CLR 2.0

CLIENT 1 : One Windows XP Professional Version 2002 SP2 P4 2.8G 1G RAM IE VER 7.0.5730.11

CLIENT 2 : One Windows XP Professional Version 2002 SP2 Core Duo 2.8G 2G RAM Using Microsoft Internet Explorer Version 6.0.2900.2180.xpsp_sp2_gdr.070227-2254

DESCRIPTION OF PROBLEM

When two or more different users are logged in as clients and one user selects data using the selectors then the follow problem occurs Randomly every 5 or so selections.

As Seen on Client 2

1) User1 one selects filter using the Infragistics searchcombo (pull down menu) select, "Current Area", then presses submit. While a second user does the same. The Control seams to start waits then expires without running any code randomly on one user.

As seen on Client 1 Senario 2.

Step 1) The user selects an area, presses submit and table populates Step 2) The user selects an area, presses submit Step 3) The async rotater spins then disappears and no new data appears ! The debug labels show new area selector code runs but that the submit code doesn't Step 4) If the user then selects another area the tables displays the selected data Step 5) Or iF The user presses submit again the data is displayed Step 6) Or if you export the code using excel export the table contains the new data.

Its as if the repaint or refresh of the Ultagridtable has not happened

I have debug flags down the bottom to figure out what is happening. if you export the code using excel export the table contains the new data.

HYPOTHESIS OF PROBLEM

1) Refresh / repaint of control broken

2) Program is sharing global variables with other programs

3) Program is sharing XML files Where does the program store XML info? where is it stored is it on disk?

4) The click action of the Infragistics controls is being stolen I still don't know if the problem is with Infragists, my code or something else.

It's important to have two users logged in at the same time so we need this problem fixed.

http://www.ryanupton.com/

http://www.zombiescomputergame.com/

http://www.zombiescomputergame.com.au/

http://www.coolguyclub.com

------------------------

RyanUpton

Fixed it, and I think it is Infragistics bug.

The process of the form is as follows. The user selects an area using the pull down, then presses submit. The Ultragrid is then populated and displayed.

The bug arises when...

The user selects the WebCombo the UltraWebGrid InitializeDataSourceEvent fires. That is the Webcombo calls the Ultragrid databind. When the user clicks fast or at the same time as other users the event runs into the submit datasource event and other webcombo datasource events. This cause random crashingbehaviour in the program

To fix it I checked to see who fires the event and ignore the webcombo originating events with the following code

protected void UltraWebGrid1_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e)
{
if (e.Equals(this.UltraWebGrid1))
{
.....

Do you agree that this is indeed a Microsoft bug and that this proposed solution solves the problem.?

Ryan Upton
MBA(adv)
BE(hons)
RCT

http://www.ryanupton.com/
http://www.zombiescomputergame.com/
http://www.zombiescomputergame.com.au/
http://www.coolguyclub.com