|
Mark,
Thank you so much. I have everything almost working.
After a little debugging I found I had to code a bit to rebuild the collection of values for each new connection added.
Now I have just a tiny issue I cannot figure out. My logic is quite simple:
protected void NextLegEventHandler( object sender, EventArgs e )
{
LegItem legItem = new LegItem( );
legNames = new Dictionary<int, LegItem>( );
foreach ( Control item in LegConstructor.Controls )
{
if ( !( item is RepeaterItem ) ) continue;
if ( item.Controls.Count <= 1 ) continue;
foreach ( Control textItem in item.Controls )
{
TextBox currentControl = textItem as TextBox;
if ( currentControl == null ) continue;
int result = 0;
if ( Int32.TryParse( currentControl.Text, out result ) )
{
legItem = new LegItem( );
legItem.LegNumber = result;
}
else
{
legItem.PortName = currentControl.Text;
legNames.Add( legItem.LegNumber, legItem );
}
}
}
LegItem newLeg = new LegItem( );
newLeg.LegNumber = legNames.Count + 1;
newLeg.PortName = string.Empty;
legNames.Add( newLeg.LegNumber, newLeg );
this.LegConstructor.DataSource = legNames.Values.ToArray<LegItem>( );
this.LegConstructor.DataBind( );
}
So this way I rebuild the values for each leg and rebind with the new list.
The problem: I have to hit the button twice to get the new entry to display! What am I missing to force the page to display the new data once I complete my response to the event?
Thanks again,
Michael
|
|
|
|
|
Why are you going through all of this
Maintain your collection (as in ViewState, Session, etc.), add one to it in the handler, then rebind. What is the dictionary for? You are only using the values from it.
Michael Eber wrote: I AM NOT AN ASP.NET Coder.
Whether you are an ASP.NET coder or not, someone with your professed skills and length of C# history should be able to figure this out. After writing a new multitasking operating system in Assembler this should be a walk in the park.
only two letters away from being an asset
|
|
|
|
|
Sorry but I'm accustomed to writing code that is stateful where I can just access the datasource, cast it, and append to it. Web coding is a completely different animal. Regardless of HOW I am doing it, whether I figure out how to use ViewState or if I figure out Session, it does not change the fact that when I set my datasource and rebind it, my controls are not displaying until I hit the button twice, or slowly walk through the code in debug mode. Why is this happening? In a real application (ie. not a freaking web p.o.s.) this is always easily figured out. But I cannot figure out why I must hit the button twice to see my control. You say just rebind it. Well I am rebinding the fracking array. And it is not doing it. If you have something USEFUL to add, please I'm all ears. But if you don't then thank you for at least getting me this far.
|
|
|
|
|
Oh yes...another reason for doing this is to get the responses in all of the textboxes.
Does that pass back in Viewstate as well?
I dug through two obvious routes (control and Page) but nothing is there to access ViewState.
|
|
|
|
|
|
Thank you for a usable answer. So it seems that the viewstate is updated prior to reaching my method ... that adds the new control. So it appears that for the webpage if I instantiate the viewstate update method after binding, then the control should show properly on the outbound process.
|
|
|
|
|
A true professional would have been able to research this for themself
only two letters away from being an asset
|
|
|
|
|
Ahhh yes, you are two letters short of an asset.
|
|
|
|
|
Hi,
We are using a .Net window service to create Customized Microsoft Project Plan 2000 through our application.
1)When the users trying to create the MPP , Windows service "WinserviceMPP.exe" is invoked to create it programatically.
2)" WinserviceMPP” windows service internally calls “Winproj.exe” to do the operations on the Microsoft Project Plan.
3)The process of Instantiation and stopping the above mentioned services will be done programmatically by the application.
4)In normal scenario the process is working fine and MPP can be generated without any issues.
5)But, in certain scenarios Creation of MPP is not happening properly.
6)When we verified in the Windows event Log, the error message is logged as “Failed to Stop Service”. These type of scenarios are coming continuously, and users are facing problems in creating the MPP.
7) When the system is failed to stopping the service, we are manually killing the service i.e stopping the service in task manager. As soon as we killed the service, MPP is creating with proper data. This means system is unable to stop the service.
8)These type of “Failed to stop service” errors coming randomly and when manually stopping the “Winproj.exe” service MPP is creating successfully.
|
|
|
|
|
I've read this three times and still can't see what it has to do with ASP.NET ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Christian Graus,
The front end application is developed in ASP.Net
|
|
|
|
|
Whether this problem is because of the windows 2003 server memory??? Becasue recently we installed symantec end point protection as Anti virus.
We are using the MPP creation through window service since 2004.Till then we didn't face this type of problem.
In one of the site i read that "It consumes a lot of memory and CPU resources - this is 'symantec end point protection' main disadvantage".So while stopping the windows service through program, becasue of insuffient memory-- system is not able to stop the process.Some times the stopping of the service is working absolutely well.
modified on Thursday, October 8, 2009 5:39 AM
|
|
|
|
|
hi;
i m a student of computer science i have assigned a project to develop a web site in asp.net and have the functionality of sending sms by using gsm modem but i dont know anything in this regard please give me a road map for this.
thanks
regards
m.hussain
|
|
|
|
|
muhammadhussain wrote: i dont know anything in this regard please give me a road map for this.
Start here[^].
|
|
|
|
|
It's amazing to me how retarded student projects are nowadays. You send an SMS by sending a message to a gateway. There is nothing I can see that you could hope to learn from doing this, as all the work will happen on the other end.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
It is so sad that you can't fix such a ridiculous logical error. Most likely you forgot a where condition on your sql.
|
|
|
|
|
i want a function for asp.net to district access file and spoil possible eleminition phisical file for shift and delete?
i want a function in asp.net access file like file system?????????
|
|
|
|
|
azamt wrote: want a function for asp.net to district access file and spoil possible eleminition phisical file for shift and delete?
i want a function in asp.net access file like file system?????????
What do you mean by that? Do you want to delete file of client system or what ?
|
|
|
|
|
i want client cant delete file.file cant delete.like my document in windows cant delete by client.you can help me?
|
|
|
|
|
azamt wrote: i want a function for asp.net to district access file and spoil possible eleminition phisical file for shift and delete
Do you write spam-mail content for a day job? That sentence is genius.
|
|
|
|
|
I wrote a program in assembler once that did exactly that
|
|
|
|
|
program give me?
i requierd this program
|
|
|
|
|
That was a joke in response to the previous comment. That is what means.
[EDIT]BTW we still cannot understand your question.[/EDIT]
|
|
|
|
|
azamt wrote: i want a function for asp.net to district access file and spoil possible eleminition phisical file for shift and delete?
I'm sorry, but this makes no sense. Perhaps you need to rephrase it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|