|
|
You question not clear.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
string path = MapPath("~/cards/");
string full = path + Session["file"] + "/";
string[] s = Directory.GetFiles(full);
foreach (string str in s)
{
string f = Path.GetFileName(str);
ImageButton im = new ImageButton();
im.Width = 150;
im.Height = 150;
im.ImageUrl = "~/cards/" + Session["file"] + "/" + f;
Session["selected"] = im.ImageUrl;
im.Click += new ImageClickEventHandler(im_Click);
PlaceHolder1.Controls.Add(im);
EnsureChildControls();
}
}
protected void im_Click(object sender,ImageClickEventArgs f)
{
Response.Redirect("editor.aspx");
}
|
|
|
|
|
this is the cod . it only displys the last imagebutton's image
|
|
|
|
|
Hi all,
Is any web monitoring tool by which if any type of problem is ocurring in my web server then an alert
mail we can find.by which we can save that problem and my web server will run without any problem.
If you know about monitoring tool then tell me ...
Thnks..
|
|
|
|
|
if you want to monitor only (without mail alert) there is an in-built utility in windows which you can find inside Control Panel --> Administrative tools -->Performance. There are different parameters mentioned and you can choose any combination and monitor server performance as per your need. It allows you to keep it running and recodring it into a log file so that you can monitor it even at your convenience time.
If you are looking for some mail kind of alert as a part of monitoring, I hope some other fellow aroud here might help you.
Thanks,
Arindam D Tewary
|
|
|
|
|
Thnks to Reply,
but I am looking for some mail kind of alert as a part of monitoring
of my webserver.
if you know any of the third party tool for monitoring it.
then tell me plese.
eathier it is paid or unpaid doesn't matter
Thanks.
|
|
|
|
|
hi sir
please help me
my problem is that if once a user is logged in then there should not be visible login page again after entring url.
i mean suppose i have entered gmail.com in ie and login then if i again open gmail.com in new ie then login page is not there.while inbox page is open.i also want the same for my application.and on login page load i have done this.
if (Session["customer"].ToString() == "Admin")
{
Response.Redirect("Admin/AdminHome.aspx");
}
and i am giving my value to Session["customer"] on login click button from txtuserid.so that's why it gives me error.object reference not set to an instance of an object.
please suggest me another suitable way to solve this issue.
modified on Saturday, March 27, 2010 5:02 AM
|
|
|
|
|
To remove "object reference not set to an instance of an object" error, you should check whether the session object is null before accessing Session["customer"] object.
Thanks,
Arindam D Tewary
|
|
|
|
|
try at the Page_load , first thing in ur page
if (Session["customer"] == null) { Response.Redirect("URLOGINPAGE.aspx"); }
this way, if the user still didnt logout, he will still have access to those secured pages without entering the login page again. till he logout
|
|
|
|
|
Session variables are not shared from window to window like that.
If using forms authentication, this is what you are looking for.
if (this.User.Identity.Name == "Admin")
{
Response.Redirect("Admin/AdminHome.aspx", false);
}
Normally you would do this the other way around. If the user tried to access AdminHome without being logged in, send them to the login and bounce them back from there if successful login.
|
|
|
|
|
thanks you very much sir for your support,
i have an another issue.please suggest me.what should i do.
when ever i am entering my url in browser ie and login page will display and i am doing successfull login.and now when i opened new browser and enter url it will show direct user home.it is absolutely right.but now sir when i am entering my url in mozilla or new browser.it should not show user home.it should show login page.but it shows user home.
if you will try for gmail through ie.after login if you will open new gmail in mozilla it will not show inbox page while it will show login page.
please suggest me how i can resolve this issue.
|
|
|
|
|
Gmail - Your assumptions are not accurate. If you do not 'sign out' of gmail in mozilla, it will open the inbox page. Same with IE. IE and mozilla operate completely independant of each other. This behavior is usually acceptable.
Assuming you are using the aspnet membership provider, you can test 'signout' functionality using
FormsAuthentication.SignOut(); .
Anytime the signout is used, I also kill the session using
Session.Abandon(); .
The membership provider behaves similar to gmail if that is the desired result.
|
|
|
|
|
I created dynamic textboxes(Textbox1,Textbox2) in repeater control. i had a button.
on button click the two text boxs are added any number of times..
the problem is the values in textboxs disappear when i click the button for second time...
How do i store the values in textboxs.Tried updatepanel but it doesnt work too...
|
|
|
|
|
Hi,
I didnt get why you have used a Update panel here. But you need to store values of text boxes in ViewState and rebind ( or re-associate) to textboxes so that values does not disappear on button click.
Please let me know if you get it going.
Thanks,
Arindam D Tewary
|
|
|
|
|
I need to update a column of a record. I am using a FormView control to provide the UI for the SqlDataSource.
The update method MUST be called from a button, rather than the built in "Update" feature of FormView1_ItemCommand, (unless there is a way to call this event with a command on the button control.)
I am attempting the SqlDataSource update by:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
SqlDataSource1.Update()
End Sub
and:
Protected Sub SqlDataSource1_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles SqlDataSource1.Updating
Dim totalcost As Single = 400
e.Command.Parameters("@TotalCost").Value = totalcost
'SqlDataSource1.UpdateParameters("TotalCost").DefaultValue = totalcost
End Sub
Neither the e.Command.Parameters("@TotalCost").Value = totalcost or the
SqlDataSource1.UpdateParameters("TotalCost").DefaultValue = totalcost has any impact.
Any help would be greatly appreciated....thank you
|
|
|
|
|
why don't you create a sql stored procedure, send the parameters and update the table which you want to be updated. It's really easy to update a field programatically.
Check this link for more info regarding stored procedure and this link for playing with stored procedures in asp.net
hope that can help, Laziale
|
|
|
|
|
Hello guys -
can someone point me to some proper article where I can learn how to use databinding in the html part of the page.
I searched google but I didn't find anything useful.
Thanks in advance
|
|
|
|
|
Have a look to this Link
Hope it'll help you
|
|
|
|
|
What did you use to search? When I search google for eval databind, at least half of the results on the first page have examples.
|
|
|
|
|
Hi,
I have created a C# ActiveX control and I am trying to access its properties and methods using javascript exactly as described in this mini article http://www.c-sharpcorner.com/UploadFile/dsandor/ActiveXInNet11102005040748AM/ActiveXInNet.aspx
However, I fail to access any properties/methods of the control and the javascript does not display an error msg
Any Ideas? Thank you
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
Don't spam the forums Pick one and stick with it
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Looks like he posted one here in ASP.NET and one in C#... You have replied as Repost at both the places. Can you please guide where is the original one?
|
|
|
|
|
Can anyone direct me to a GOOD, THOROUGH example of using modal forms in VB.net? I've Googled it but I can't seem to find anything that works. They always seem to leave out some important parts. I'm relatively new to VB.net and I need some real guidance, not just partial snippets.
|
|
|
|
|