3
Answers

How to get the values from aspx page(html) to codebehind.

Hi,

 How to get values from the aspx page i.e., html page to codebehind page.I used aspx page code like,

<asp:Button ID="btnGo" Font-Bold="true" TabIndex="3" Height="18px" ValidationGroup="1"
runat="server" Text="Go" OnClientClick="LoadFiles(7);return false;" />

function LoadFiles(RecordStatus)

{

var Type = window.document.getElementById("ctl00_ContentPlaceHolder1_ddlUsers").value;

var LastDays = document.getElementById("<%=txtLastDaysFiles.ClientID %>").value;

}

now i need to get value of type,lastdays aswell as RecordStatus value from aspx page to codebehind page:

codebehind:

private void displayArchiveDetails(Int32 PageNumber)

{


Int32 Type = Convert.ToInt32(Request.QueryString["status"]);

Int32 LastDays = Convert.ToInt32(Request.QueryString["day"]);

}

can anyone please help me how to do this in c# code?

Thanks in advance,

Answers (3)