Passing variables via query string

i am trying to load different xml that get generated through .net when I am trying to pass varibels i am getting undefined. Can someone give me a heads up on what i might be doing wrong. from what I have read and learned I can pull via-


xmlData.load("/family/galleryimage.xml.aspx?pid=" + _root.loaderInfo.parameters.pid.toString()); 

Then I am defining pid in within the object class.


 <param name="pid" value='<% =Request.QueryString["pid"] %>'> 

However I am getting undefined. Any help is much appreciated, thanks.
MT