Thursday, March 29, 2012
Newbie : Form question !
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
Do I have to add a hidden field to store the blabla ?
Thanks for your help
Stanyou can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
Regards,
Augustin
"Stan SR" <stan@.pasdepam.netsunset.com> wrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I use a Unique Identifier data for my website that I get using the
> Request["sid"]
> That means most of my links are formatted like mypage.aspx?sid=blabla
> So, I need to understand how to add the "?sid=blabla" onto a page where I
> have a form with several fields
> Do I have to add a hidden field to store the blabla ?
>
> Thanks for your help
> Stan
>
>
>
Yes. I have no doubt about this, but how to set the variable as a
queryString parameter when a page is Loaded ?
here's my case :
<form id="form1" runat="server>
<asp:CheckBox id="b" runat="server" text="test" />
</form>
In my codeBehind, I check if a "sid" url parameter is transmitted.
If not I generate one.
And I would like to place it a url parameter.
When I look at the source, I get this
<form name="form1" method="post" action="mypage.aspx" id="form1">
<input id="b" name="b"><label for "b">test</label>
</form>
What I need is to get
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
Stan
"Augustin Prasanna"
> you can either add a querystring or have a hidden field (having method as
> 'Get' will add all the form fields as querystring parameters)..
> Regards,
> Augustin
> "Stan SR" <stan@.pasdepam.netsunset.com> wrote in message
> news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
>
> What I need is to get
> <form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">[/colo
r]
You could set this in Page.Form.Attributes or use the PostBackUrl
property of your submit button to send the form to the new URL.
Tim
Newbie : Form question !
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
Do I have to add a hidden field to store the blabla ?
Thanks for your help
Stanyou can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
Regards,
Augustin
"Stan SR" <stan@.pasdepam.netsunset.comwrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
Hi,
>
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
>
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
>
Do I have to add a hidden field to store the blabla ?
>
>
Thanks for your help
>
Stan
>
>
>
>
>
Yes. I have no doubt about this, but how to set the variable as a
queryString parameter when a page is Loaded ?
here's my case :
<form id="form1" runat="server>
<asp:CheckBox id="b" runat="server" text="test" />
</form>
In my codeBehind, I check if a "sid" url parameter is transmitted.
If not I generate one.
And I would like to place it a url parameter.
When I look at the source, I get this
<form name="form1" method="post" action="mypage.aspx" id="form1">
<input id="b" name="b"><label for "b">test</label>
</form>
What I need is to get
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
Stan
"Augustin Prasanna"
Quote:
Originally Posted by
you can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
>
Regards,
Augustin
>
"Stan SR" <stan@.pasdepam.netsunset.comwrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
>Hi,
>>
>I use a Unique Identifier data for my website that I get using the
>Request["sid"]
>That means most of my links are formatted like mypage.aspx?sid=blabla
>>
>So, I need to understand how to add the "?sid=blabla" onto a page where I
>have a form with several fields
>>
>Do I have to add a hidden field to store the blabla ?
>>
>>
>Thanks for your help
>>
>Stan
>>
>>
>>
>>
>>
>
>
What I need is to get
Quote:
Originally Posted by
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
You could set this in Page.Form.Attributes or use the PostBackUrl
property of your submit button to send the form to the new URL.
Tim
Monday, March 26, 2012
newbie aspx.vb file question
I am brand new at building asp.net web sites. I am going through a site now that has some code behind links to aspx.vb files. I realize these files are compiled into dlls and used that way. But I am trying to find the aspx.vb files so I can review the actual code. Where are these files normally kept?
Thank you, in advance.
Jim
Hey Jim,
The *.vb files should be kept in the same directory as their corresponding *.aspx file. If the *.vb files don't exist in the same directory as the *.aspx files it is because a) the web site was pre-compiled and the code behind files are now packaged in a DLL as you mentioned or b) the code behind is inline in the *.aspx files (the code behind files do not have to be separated out into a separate file, they can be in the *.aspx file in a <script> block.)
Quick reference:
*.aspx files: Presentation Layer (HTML + ASP.NET controls)
*.vb or *.cs files : Codebehind files that go along with matchting *.aspx files (these are optional as code can be included in <script> blocks in the *.aspx pages.)
Hope that helps.
-Aaron
Friday, March 16, 2012
NEWBIE needs helps about creating links
To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@dotnet.itags.org.googlegroups.com>
Subject: NEWBIE needs help for creating links
Date: Sat, 24 Dec 2005 17:42:34 -0800
Hi :
Firstly, i am sorry for stealing your time for this easy problem of
mine, but i crashed.
I have a datalist, and i show a small pic and a little about the news,
in it. There is a details link at bottom. I want to carry the news_id
and news_category informations to details page, but i could not ! As a
summary i need this kind of thing :
http://www.mysite.com/newsdetails.a...category=health
I have used an 'asp :Hyperlink' but for databound method of this item,
i could only carry news_id. How can i carry more? Which tool to choose,
and how?
By the way i am an VisualStudio 2005 (Rel.Can) user.
Thanks for your helps.
Best RegardsTry either one of the following, either one should work:
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%# "http://www.mysite.com/newsdetails.aspx?news_id="
& Server.UrlEncode(Container.DataItem.news_id) & "&news_category=" &
Server.UrlEncode(Container.DataItem.news_category) %>'
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%#
String.Format("http://www.mysite.com/newsdetails.aspx?news_id={0}&news_category={1}",
Server.UrlEncode(Container.DataItem.news_id),
Server.UrlEncode(Container.DataItem.news_category) ) %>'
Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Enes Kabacaoglu" <eneskbc@.gmail.com> wrote in message
news:1135475065.426723.31940@.z14g2000cwz.googlegro ups.com...
> From: "Enes Kabacaoglu" <eneskbc@.gmail.com>
> To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@.googlegroups.com>
> Subject: NEWBIE needs help for creating links
> Date: Sat, 24 Dec 2005 17:42:34 -0800
> Hi :
> Firstly, i am sorry for stealing your time for this easy problem of
> mine, but i crashed.
> I have a datalist, and i show a small pic and a little about the news,
> in it. There is a details link at bottom. I want to carry the news_id
> and news_category informations to details page, but i could not ! As a
> summary i need this kind of thing :
> http://www.mysite.com/newsdetails.a...category=health
> I have used an 'asp :Hyperlink' but for databound method of this item,
> i could only carry news_id. How can i carry more? Which tool to choose,
> and how?
> By the way i am an VisualStudio 2005 (Rel.Can) user.
> Thanks for your helps.
> Best Regards
NEWBIE needs helps about creating links
To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@dotnet.itags.org.googlegroups.com>
Subject: NEWBIE needs help for creating links
Date: Sat, 24 Dec 2005 17:42:34 -0800
Hi :
Firstly, i am sorry for stealing your time for this easy problem of
mine, but i crashed.
I have a datalist, and i show a small pic and a little about the news,
in it. There is a details link at bottom. I want to carry the news_id
and news_category informations to details page, but i could not ! As a
summary i need this kind of thing :
http://www.mysite.com/newsdetails.a...category=health
I have used an 'asp :Hyperlink' but for databound method of this item,
i could only carry news_id. How can i carry more? Which tool to choose,
and how?
By the way i am an VisualStudio 2005 (Rel.Can) user.
Thanks for your helps.
Best RegardsTry either one of the following, either one should work:
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%# "http://www.mysite.com/newsdetails.aspx?news_id="
& Server.UrlEncode(Container.DataItem.news_id) & "&news_category=" &
Server.UrlEncode(Container.DataItem.news_category) %>'>
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%#
String.Format("http://www.mysite.com/newsdetails.aspx?news_id={0}&news_categ
ory={1}",
Server.UrlEncode(Container.DataItem.news_id),
Server.UrlEncode(Container.DataItem.news_category)) %>'>
Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Enes Kabacaoglu" <eneskbc@.gmail.com> wrote in message
news:1135475065.426723.31940@.z14g2000cwz.googlegroups.com...
> From: "Enes Kabacaoglu" <eneskbc@.gmail.com>
> To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@.googlegroups.com>
> Subject: NEWBIE needs help for creating links
> Date: Sat, 24 Dec 2005 17:42:34 -0800
> Hi :
> Firstly, i am sorry for stealing your time for this easy problem of
> mine, but i crashed.
> I have a datalist, and i show a small pic and a little about the news,
> in it. There is a details link at bottom. I want to carry the news_id
> and news_category informations to details page, but i could not ! As a
> summary i need this kind of thing :
> http://www.mysite.com/newsdetails.a...category=health
> I have used an 'asp :Hyperlink' but for databound method of this item,
> i could only carry news_id. How can i carry more? Which tool to choose,
> and how?
> By the way i am an VisualStudio 2005 (Rel.Can) user.
> Thanks for your helps.
> Best Regards
>