How grap the passed value in URL

admin

Administrator
Staff member
Hi guys i am passing a aspx page with teamno value( teamsandmatchs.aspx?team=2 ) I do not know how i can grap that passed value and place it inside html url. i want the passed value to be placed after teamno=.


p><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://localhost/updatemachrecord/insertmatchviateam.aspx?teamno=">Add Record</a>



i be happy if some one show me how i put passed value team after ?teamno= in the url.Thanks

here is my page code

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="teamsandmatches.aspx.vb" Inherits="updatemachrecord.teamsandmatches"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebFormTeams</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:DataGrid id="DataGridTeams" style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 64px"
runat="server" Width="264px" Height="208px" BorderColor="White" BorderStyle="Ridge" CellSpacing="1"
BorderWidth="2px" BackColor="White" CellPadding="3" GridLines="None" PageSize="5" AllowPaging="True">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#9471DE"></SelectedItemStyle>
<ItemStyle ForeColor="Black" BackColor="#DEDFDE"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#E7E7FF" BackColor="#4A3C8C"></HeaderStyle>
<FooterStyle ForeColor="Black" BackColor="#C6C3C6"></FooterStyle>
<Columns>
<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
<asp:HyperLinkColumn Text="Edit" DataNavigateUrlField="MATCHNO" DataNavigateUrlFormatString="http://localhost/updatemachrecord/matchupdateteams.aspx?match={0}"></asp:HyperLinkColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="#C6C3C6" Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
</form>
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://localhost/updatemachrecord/insertmatchviateam.aspx">Add Record</a>
<asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 168px; POSITION: absolute; TOP: 16px" runat="server"
Height="32px" Width="184px">Matches Record by teams</asp:Label></p>
</body>
</HTML>You can use a code block just like in asp classic.
<% and %> still exist and using them might just be the most conveiniant way to do this.You can use a code block just like in asp classic.
<% and %> still exist and using them might just be the most conveiniant way to do this.

Thank u for u reply . i tried like t his but i get error !


p><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://localhost/updatemachrecord/insertmatchviateam.aspx?teamno=<% Request.QueryString(''team") %>Add Record</a>



error : compilation error


property aceess must asign tothe property or user its value.

i be happy if u help me fix this .Thanks<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://localhost/updatemachrecord/insertmatchviateam.aspx?teamno=<%=Request.QueryString("team")%>Add Record</a>Yeah, you need that = sign (as seen in the previous post) or you would have to

response.write(request.querystring("team")) to write your varaible out right there.

The = is just easier.
 
Back
Top