Web browser control

Mar 25, 2009 at 3:19 PM
I need to Know how to use this control.
I create a cotrol of type "WebBrowserControl", I complete the Atributes whit :
URL=http://bbwk35/TFSCargaHoras/Default.aspx?WorkItem={0} 
Params=System.Id
but the URL is truck before "="
<Control Type="WebBrowserControl" Label="" LabelPosition="Left" Dock="Top" URL="http://bbwk35/TFSCargaHoras/Default.aspx?WorkItem" Params="System.Id" />
the URL lose "={0}".
someone can help me?

thank.
Aug 19, 2009 at 7:51 AM

I finally figured out what 'diegot' is talking about. (took a bit though, because his description is a bit vague).

Basically, if you're using Process Template Editor to register the WebBrowserControl, a curious behaviour of the editor (within Process Template Editor) is that it trims anything where a second "equals" sign is encountered. I.e. you may have put in

URL=http://bbwk35/TFSCargaHoras/Default.aspx?WorkItem={0}

but when you view it in the XML, it has cleared the value

<Control Type="WebBrowserControl" Label="Basic custom label:" LabelPosition="Top" Dock="Fill" URL="http://bbwk35/TFSCargaHoras/Default.aspx?WorkItem" Params="System.ID" />

So this is actually a bug in the Process Template Editor, not in the WitCustomControl code.
I suggest the workaround (which works for us) is to put the value in the keyname ... i.e. without the equals sign. you could use your own delimiter, so long as the code on the Default.aspx page knows how to iterate through the keys of the Request.QueryString object. i.e. the data is being passed in the name rather than the value but that's okay because it bypasses the problem.

http://bbwk35/TFSCargaHoras/Default.aspx?WorkItem|{0}

This approach worked for our implementation, hope it helps someone else who is encountering the same issue.
Regards,

Feb 23, 2010 at 4:26 PM

The truncation after the equals sign is happening to me also - but I'm using the import/export functionality of the TFS power tools. This presumably does the same thing as the command-line import/export. I'm not sure how else to access the XML file, so I don't know how to prevent the truncation.

I also had trouble passing two parameters. The XML isn't modified on import - it comes back out the same - but the URL sent to the server is truncated at the ampersand. To pass more than one parameter, I defined the attribute like this:

url="http://myserver.com/myproject/Loader.htm?Id{0}|AreaId{1}"  <-- no ampersand in the attribute, escaped or not.