Someone help me if possible!

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 36
Reputation: Alexpap is an unknown quantity at this point 
Solved Threads: 0
Alexpap Alexpap is offline Offline
Light Poster

Someone help me if possible!

 
0
  #1
Jul 13th, 2009
Hello all,
im writing an ASP.NET application and i wonder if is there a way that can i obtain the ASP.NET markup code(e.g. <asp:button etc etc) of a control that it is created 'on the fly'.


Please answer me as soon as possible,
Alex
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: Someone help me if possible!

 
0
  #2
Jul 13th, 2009
i dont understand your question.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,200
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Someone help me if possible!

 
0
  #3
Jul 13th, 2009
In short -- no. For standard <asp: you don't have to worry about tag prefixes either that you might with third party controls. Why are you trying to get at designer generated code in your application anyway? It isn't valid markup .. unless you are trying to write a code generator for making asp.net pages?
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 164
Reputation: dnanetwork has a little shameless behaviour in the past 
Solved Threads: 24
dnanetwork's Avatar
dnanetwork dnanetwork is offline Offline
Junior Poster

Re: Someone help me if possible!

 
0
  #4
Jul 14th, 2009
do u mean .....you want to create the control on the fly...?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 36
Reputation: Alexpap is an unknown quantity at this point 
Solved Threads: 0
Alexpap Alexpap is offline Offline
Light Poster

Re: Someone help me if possible!

 
0
  #5
Jul 14th, 2009
Originally Posted by sknake View Post
In short -- no. For standard <asp: you don't have to worry about tag prefixes either that you might with third party controls. Why are you trying to get at designer generated code in your application anyway? It isn't valid markup .. unless you are trying to write a code generator for making asp.net pages?
That's exactly what i want to do. do you have any idea how can i do this?

Or can you provide me with other solutions that can help me in this situation?
Last edited by Alexpap; Jul 14th, 2009 at 7:52 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,200
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Someone help me if possible!

 
0
  #6
Jul 14th, 2009
Can you just build a list of known controls and use that? When you drop a control on the designer it calls RegisterTagPrefix() which handles getting the prefix name if it is already in use etc etc.

I would recommend dropping the controls on a form and getting the string values and going from there. You also have to update the .designer.cs file with the control names and classes. This isn't a straightforward thing to do but it can be done
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 36
Reputation: Alexpap is an unknown quantity at this point 
Solved Threads: 0
Alexpap Alexpap is offline Offline
Light Poster

Re: Someone help me if possible!

 
0
  #7
Jul 15th, 2009
what do you mean the string values of the control??
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,200
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Someone help me if possible!

 
0
  #8
Jul 15th, 2009
Drop a control on to a web form and copy the code from the designer. Get the list of all designer generated code you need from hand. It shouldn't take more than 30 minutes to get them all. I think it may take hours to reflect out the information you need.. if its even possible.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC