Hi,
   It will work. Means that if u want to access/pass value of any variable as 
inline coding first of all define that should be protected modifier & place 
that variable in VIEWSTATE So that the value of the variable retains. And then 
use :
For Ex
 
// Variable declaration
protected string methodInput;
 
// On page Load
if (!PostBack)
{
  methodInput = Request.QueryString["parameterName"].ToString();
ViewState["methodInput"] = methodInput;
}
 
Now in inline code again get value from the viewstate:
<%
methodInput =ViewState["methodInput"];   

%>
 
 
<asp:LinkButton id="SubmitButton" CommandName="submit"
CommandArgument='<%=methodInput%>' OnCommand="DoSubmit"
runat="server">Submit</asp:LinkButton>
 
Regards
 
Krishan Kant
 
 
 
 
   

"Falls, Travis D (HTSC, CASD)" <[EMAIL PROTECTED]> wrote:
I am collecting a querystring in the onPageLoad and I want to supply that to
the CommandArgument.  I have a protected variable named methodInput in the
codebehind I assign the query string to.  I know we can't use <%%> in a
server tag... is there a way to accomplish this?

<asp:LinkButton id="SubmitButton" CommandName="submit"
CommandArgument='<%=methodInput%>' OnCommand="DoSubmit"
runat="server">Submit</asp:LinkButton>

Travis D. Falls | Consultant   RAFT.Net   IT | 860.547.4070 |
[EMAIL PROTECTED]


*************************************************************************
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************



---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "AspNetAnyQuestionIsOk" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


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



Send instant messages to your online friends http://uk.messenger.yahoo.com 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to