|
No, because as soon as you open a pop-up window your application is split in two and they can now continue navigating around the mainpage even with the pop-up open.
best to keep it all in the same window anyway
|
|
|
|
|
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string s17 = Request.Form["scheck"].ToString();
scheck.Value = s17;
Response.Write(s17);
string s18 = Request.Form["sacc1"].ToString();
sacc1.Value = s18;
Response.Write(s18);
string s19 = Request.Form["schild"].ToString();
schild.Value = s19;
Response.Write(s19);
string s = Session["child"].ToString();
//Response.Write(s);
//Response.Write(s19);int.Parse(Request.Form["schild"])==1
if (int.Parse(s19)== 1)
{
Session["a"] = ctcchild1.name;
Session["b"] = ctcchild1.age;
Session["c"] = ctcchild1.college;
}
else if (int.Parse(s19)==2)
{
Session["d"] = ctcchild2.name;
Session["e"] = ctcchild2.age;
Session["f"] = ctcchild2.college;
}
//else
//{
else if (2<int.parse(s19)><= 3)
{
Session["g"] = ctcchild3.name;
Session["h"] = ctcchild3.age;
Session["i"] = ctcchild3.college;
}
else if(int.Parse(s19) == 4)
{
Session["j"] = ctcchild4.name;
Session["k"] = ctcchild4.age;
Session["l"] = ctcchild4.college;
}
how to apply condition at this place
plz tell me
thanks
|
|
|
|
|
what do you mean by
gaurav mangal wrote: how to apply condition at this place
|
|
|
|
|
gaurav mangal wrote: if (int.Parse(s19)== 1)
{
Session["a"] = ctcchild1.name;
Session["b"] = ctcchild1.age;
Session["c"] = ctcchild1.college;
}
else if (int.Parse(s19)==2)
{
Session["d"] = ctcchild2.name;
Session["e"] = ctcchild2.age;
Session["f"] = ctcchild2.college;
}
//else
//{
else if (2<int.parse(s19)><= 3)
{
Session["g"] = ctcchild3.name;
Session["h"] = ctcchild3.age;
Session["i"] = ctcchild3.college;
}
else if(int.Parse(s19) == 4)
{
Session["j"] = ctcchild4.name;
Session["k"] = ctcchild4.age;
Session["l"] = ctcchild4.college;
}
if you have conditions like this, how would u retrieve correct data back from Session ???
apr ~ asp
|
|
|
|
|
then plz tell me what should i do.
|
|
|
|
|
actually i am taking value from one page to other page using sessions .
but i want at secont page that if the value of session["s1"] ==2 to webcontrol should be generate two times.and it ==3 then usercontrols should be generate 3 times .so i have to apply condition :
if(session["s1"]==1)
{
}
if(1<session["s1"]><=2)(error)
{
}
now i get error:
Operator '|' cannot be applied to operands of type 'bool' and 'int'
what should i do.
thanks
|
|
|
|
|
gaurav mangal wrote: if(1<session["s1"]><=2)
That if condition is totally wrong!
I'm not able to understand what you are trying to do here.
Can you please explain?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
thanks for the response.
actually i want that if a user select 2 from dropdownlist or 3 or 4 .
then at second page 2 or 3 or 4 usercontrol will create .so i have
tha value of dropdownlist in sessions .
and want to apply condition on that .
this is the code .
or you suggest what should do.
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string s17 = Request.Form["scheck"].ToString();
scheck.Value = s17;
Response.Write(s17);
string s18 = Request.Form["sacc1"].ToString();
sacc1.Value = s18;
Response.Write(s18);
string s = Session["child"].ToString();
//Response.Write(s);
//Response.Write(s19);int.Parse(Request.Form["schild"])==1
if (int.Parse(s)== 1)
{
Session["a"] = ctcchild1.name;
Session["b"] = ctcchild1.age;
Session["c"] = ctcchild1.college;
}
else if (1<int.parse(s)><=2)(error)
{
Session["d"] = ctcchild2.name;
Session["e"] = ctcchild2.age;
Session["f"] = ctcchild2.college;
}
//else
//{
else if (2<int.parse(s)><=3)(error)
{
Session["g"] = ctcchild3.name;
Session["h"] = ctcchild3.age;
Session["i"] = ctcchild3.college;
}
else if(int.Parse(s19) == 4)
{
Session["j"] = ctcchild4.name;
Session["k"] = ctcchild4.age;
Session["l"] = ctcchild4.college;
}
|
|
|
|
|
I'm not able to understand why you are doing in this way.
How do you know that total number of user controls you are creating.
Because, if you are using if there always will be a limit.
Why cant you do something like below
<br />
int totalControl=0;<br />
if(Session["child"]!=null)<br />
{<br />
totalControl=int.Parse(Session["child"].ToString());
for(int curControl=0;curControl<totalcontrol;curcontrol++)><br />
{<br />
}<br />
}<br />
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Sherin Iranimose wrote: totalControl=int.Parse(Session["child"].ToString());//Should be always contain numbers in session.
If you aren't sure about the session content, the above method is not secure as it may throw "FormatException" if session has an invalid value. Here is a safe method
if(int.TryParse(Session["child"].ToString(),out totalControl))
{
}
|
|
|
|
|
Thanks Sherin
its working .ya you are right .plz tell now how i can take the values from user controls .and how i can retrive the values at next page .
but the condition is same .if 2 is selected then only two user control should be appear and values of these user control go to the next page.
plz send me the code
Thanks .....Again
gaurav
|
|
|
|
|
at next page i want tha values of user control should be appear in a table .i have set property in usercontrol .aspx.cs page .
|
|
|
|
|
Hi
I have some video file located on server.I want to show thumbnail of these wmv file in my web application.Now my problem is that i don't know how to create thumbnail from wmv file.
If anybody know Please reply me at ankit_jain26@rediffmail.com
Thanks
|
|
|
|
|
Hi All
I have some problem,i am working on chat application,and want to create
Push server ,can any one give me some idea or link ,how to create push server in dot net (For pooling data from client to server) ,i hope u guys understand the problem.
Thanks
|
|
|
|
|
check this out
http://www.15seconds.com/issue/971102.htm
|
|
|
|
|
Hi
Thanks man , The article is good,but my problem is still in pending,do u have any idea abt comet server,in which language i create the comet server,if u know abt that then help me
Thanks
|
|
|
|
|
hi all,
I am using application state in my project but but it will expired soon...why..please reply me.
thanks
Rajendran.AL
|
|
|
|
|
Application State will not expire until your Application is recycled. The recycling can be an IIS restart, new deployment or runtime change in web.config file.
|
|
|
|
|
Hi,
Iam trying to let the user upload through the FCKeditor from his PC.In the config.asp file I set the following:
FCKConfig.LinkBrowser = true;
FCKConfig.ImageBrowser =true;
FCKConfig.LinkUpload = true;
FCKConfig.ImageUpload =true;
in config.asp :
Dim ConfigIsEnabled
ConfigIsEnabled = True
Then I created the UserFiles in the root folder
I tried using the connector.aspx instead of the connector.asp as following:
//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ;
But this did nothing.
When I try to browse the server in Image Info tab I get the following error:
The server didn't send back a proper XML response.
Do any one know how to set the FCKeditor V2.2 so it let the user upload files from his PC in asp.net 2?
I am too late but i will never give up
|
|
|
|
|
Hello All,
I've been reading about Login Controls and I'm planning to practice using them, however I've come across a stumbling block. The article that I've read did not say anything about a database being involved and I'm pretty sure a database is going to be needed to store users' info before users can login. Also how does the Login Control know which database will be used to check the entered login info? Thanks in advance for your help.
modified on Wednesday, July 9, 2008 1:05 AM
|
|
|
|
|
I would always write my own login control. However, the control that's built in, fires events, you check with your data source to make sure the login is OK, and let the control know. The control also won't magically make it that a user can't view your pages without first logging in.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Here is what I'm trying to do: I have a MasterPage with a couple of HtmlAnchor controls, like this:
<a runat="server" href="~/About.aspx" onserverclick="HtmlAnchor_Click">About</a>
All I want that in the HtmlAnchor_Click method to modify the attribute of the control and remove the link from the anchor (modify the InnerHtml). But when I try to do that I get the error from the title.
Here is how I'm trying:
protected void HtmlAnchor_Click(object sender, EventArgs e)
{
HtmlGenericControl ctrl = sender as HtmlGenericControl;
string innerHtml = ctrl.InnerHtml;
}
Anyone hints?
|
|
|
|
|
Why do a postback ? I would do this in javascript.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
You can only use the InnerHtml property if the actual type of the control is LiteralControl or DataBoundLiteralControl, but your control is an HtmlAnchor.
If you want to change the contents of the control, clear the Controls collection of the control, then add a LiteralControl with the text that you want. Alternatively, if you know that it contains a single LiteralControl, get the reference to that control from the Controls collection, and change it's text.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Try this,
<a runat="SERVER" href="~/About.aspx" onclick="this.innerHTML='';">About<;/a>
Why are you wanting to do this? If you just want to hide the control you can use .Visible = false;
HTH
|
|
|
|