Menu

[r6]: / trunk / NUnitWebTestPages / OrdinaryHtml.aspx.cs  Maximize  Restore  History

Download this file

82 lines (79 with data), 2.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class OrdinaryHtml : System.Web.UI.Page
{
protected string m_output = "";
protected string m_hiddenVal = "qpr";
protected void Page_Load(object sender, EventArgs e)
{
if (Request.ServerVariables["REQUEST_METHOD"] != "POST")
{
Session["chk"] = "on";
Session["slct"] = "1";
Session["rdo"] = null;
Session["txtarea"] = "This is the content";
Session["pwd"] = "";
Session["txt"] = "";
}
else
{
if (Request["hdn"] != null)
{
m_hiddenVal = Request["hdn"];
}
if (m_hiddenVal == "abc")
{
m_hiddenVal = "qpr";
}
else
{
m_hiddenVal = "abc";
}
if (Request["btnTest"] != null)
{
m_output = "btnTest clicked";
}
else if (Request["sub"] != null)
{
if (Request["pwd"] != null && Request["pwd"] != (string)Session["pwd"])
{
Session["pwd"] = Request["pwd"];
m_output = Request["pwd"];
}
else if (Request["txt"] != null && Request["txt"] != (string)Session["txt"])
{
Session["txt"] = Request["txt"];
m_output = Request["txt"];
}
}
if (Request["chk"] != (string)Session["chk"])
{
Session["chk"] = Request["chk"];
m_output = "checkbox = " + ((Request["chk"] == "on") ? "True" : "False");
}
if (Request["slct"] != (string)Session["slct"])
{
Session["slct"] = Request["slct"];
m_output = "selected=" + Request["slct"];
}
if (Request["rdo"] != (string)Session["rdo"])
{
Session["rdo"] = Request["rdo"];
m_output = "radio=" + ((Request["rdo"] == "on") ? "True" : "False");
}
if (Request["txtarea"] != (string)Session["txtarea"])
{
Session["txtarea"] = Request["txtarea"];
m_output = "textarea=";
}
}
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.