|
You are kind of right, and yet, utterly wrong.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
arifliminto86 wrote: I am still newbie in asp.net
I see that. You're obviously not writing commercial code, this isn't good enough for a beginners class. So, I suggest you either take a class, or buy a book and work through all of it. If you're writing commercial code, then you're a liar and a thief.
Your basic problem is that you don't have the slightest clue how ASP.NET works. Your server is doing NOTHING after your page is delivered. To get a page to auto refresh, you need a timer on the client, not on the server.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Christian Graus wrote: Your basic problem is that you don't have the slightest clue how ASP.NET works. Your server is doing NOTHING after your page is delivered. To get a page to auto refresh, you need a timer on the client, not on the server.
Perhaps you ought to rephrase that. There is actually a method to refresh a page WITHOUT a timer AND from the client. Add the following meta tag to your page;
<meta http-equiv="refresh" content="900;URL={the fully qualified url of the page to be refreshed}" />
'900' represents the amount of time between refreshes.
|
|
|
|
|
Hi All,
I want to have a toggle images, so I did this.
<br />
<asp:TemplateField HeaderText="Start/Stop"><br />
<ItemTemplate><br />
<asp:CheckBox ID="chkStatusTogel" runat="server" <br />
OnCheckedChanged="chkStatusTogel_CheckedChanged" AutoPostBack="false" /><br />
<ajaxToolkit:ToggleButtonExtender ID="ToggleEx" runat="server"<br />
TargetControlID="chkStatusTogel" ImageWidth="16" ImageHeight="16"<br />
CheckedImageAlternateText="Stop" UncheckedImageAlternateText="Start"<br />
CheckedImageUrl="images/exit.png" UncheckedImageUrl="images/run.png" /><br />
</ItemTemplate><br />
</asp:TemplateField><br />
I can toggle between images. Now I want to handle the checked event.
But I've a big problem here. If I set the AutoPostBack to false, I cannot catch the CheckedChange event. If I set AutoPostBack to true, I can catch the event, but page refreshed automatically. I don't want that. How can I solve this.
Please help me, I'm new to ASP.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I guess you want to try to use AJAX. I don't think newbies should use AJAX until they understand ASP.NET, however.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Sounds like a job for Java or DHTML (really java too, although that statement raises the hackles on some). There are a large number of situations that require you to slide java in the middle of the process specifically becuase of the type of action(problem) you describe.
AJAX is simply more complex java code already rolled up for you to produce some nice 'effects' and functionality. It's nothing more than that though. An understanding of java helps dramatically in using AJAX, but is not necessary (as they are really the same thing).
Write a quick little java applet to switch your images and place the name of your java routine in the onclick attribute of the asp checkbox tag. Its really that simply and pretty neat once you get the hang of it. Search for some 'MouseOver' java code in aspx if you need examples. They are pretty easy to whip into what you need.
|
|
|
|
|
hai all,
am adding the following code in html for disabling the back button.
but am need to call this function on pageload?
If to call,how to do that?
Am just added in html and tested but its not working.
Please let me know if any of u know the solution
My code is here
function StopBackward()
{
window.history.back(-1);
}
kissy
|
|
|
|
|
You're living in a fantasy. You can't stop the user going back. Instead, you should fix your overall design.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
For what reason do you want to disable the back button? Many, including myself, use the back button often and I would consider it to be a usability issue if I couldn't go back a page easily.
|
|
|
|
|
thanks for ur answers.
Ex:If menu contains,
page1
page2
page3 and logout page.
after login,he can go to page2 and page1 with back button,but from page1 he should not go to login page with browsers.With logout only he can go back to login page.
once user login,and reached main menu page,until unless he clicked on the logout,he should not go back to the login page by clicking on the browers back button.
This is my requirement.Please let me know if any one of u understand and had solution.
kissy
|
|
|
|
|
Just as long as the page isn't cached then you can handle what to do in the one of the page events (not sure of the best one, maybe page_load?).
That is, if the user is logged in and he/she tries to go back to the login page then hide the login form and maybe show a message saying 'Already Logged In' or something. If the user has logged out and he/she tries to go back to a secured page then re-direct to the login page.
I think you can set whether to cache the page or not using the Response object.
|
|
|
|
|
Like I said, if you fix your site, then you will solve your problem. Write good code, don't try to hack your way through bad code.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
thanks for ur answer,but i dont understand ur idea.
how to fix the design.
What exactly i have to do.
I think u got my question and please try to explain me correctly.
please it is my request.
kissy
|
|
|
|
|
Try this out;
protected void Page_load
{
StringBuilder javaScript = new StringBuilder();
javaScript.Append("\n<script language=JavaScript>\n");
javaScript.Append("window.history.forward(1);\n");
javaScript.Append("</script>\n");
Page.RegisterClientScriptBlock("HistoryScript", javaScript.ToString());
}
Its a bit of a trick, but works for me. The real problem is that newer browsers purposefully remove the ability for code to effect the menus of the browser now as some nasty hackers keep finding ways to hijack the browser using these methods. Probably the code above will become useless after a time too when someone starts to use it in-appropriately and we will have to creatively come up with a new method. Just be cautious in how you apply it.
|
|
|
|
|
For GOD'S sake abandon the way you're doing it. Many MANY people post similar questions, and the answer's always the same. If you NEED to disable standard controls in the browser for your site to work, you've designed it WRONGLY.
Not sure I understand what you're asking, but I suspect that it's that you don't want users to redirect to a login page they've already completed - if that's the case, look at Forms authentication in MSDN...but please PLEASE don't start hacking the browser just to make things work - it's not only really silly, but it also gives others the idea that it's OK!
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Hi all,
I just Plan to do MCP in ASP.NET 2.0, pls where do i find the free dumps and also mention the exam number for this.
Thanks
|
|
|
|
|
KKK MCA wrote: I just Plan to do MCP in ASP.NET 2.0, pls where do i find the free dumps and also mention the exam number for this.
If you are already planned for doing certification from Dumps, then its better to don't do the certification.
If you want to learn details on certification Check here
|
|
|
|
|
hi abhijit
thanks for your reply, could you provide the Syllabus details for MCP and mention the exam number for MCP like 70-350...
|
|
|
|
|
I have already provided you a link with all the Exam list. Click on this url you will get the details!
|
|
|
|
|
You really think that an employer won't work out that you have no idea about ASP.NET and just used 'dumps' to cheat on the exams ? This is why exams are useless.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hello,
I am working with ASP.net 2008.
I am using Users, Membership, roles through Website->ASP.NET configuration menu. I would like to use it while is pointing to an external database not the local one. How do I tell him to use external SQL server database. I have already add the database through aspnet_regsql.exe.
Thank you
Eric H.
|
|
|
|
|
By Default ASP.NET stored membership information in local database. If you want to store it in remote database you have to add the database using aspnet_regsql.exe command.As You have already add the database, you are now one step ahead. Just do the following entry in web.config.
In the ConnectionStrings section of the web.config add the new ConnectionString for the new Database
<add
name="MemberShipConnectionString"
connectionString="Data Source=ServerName;Initial Catalog=myDB;Integrated Security=True"
providerName="System.Data.SqlClient"/>
In the Membership section of the web.config, give the same connection string the you have added for new database
<membership>
<providers>
<add
connectionStringName="MemberShipConnectionString"
applicationName="/"
name="MembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
.......
/>
</providers>
</membership>
Hope this will help you.
|
|
|
|
|
Thank you for your precious help, it works
Eric H.
|
|
|
|
|
Hi all, i am trying to open an access application found on a server using System.Diagnostics.Process.Start(path). it works fine when i run the project from VS2008 but when i deploy it doesnt work. Any ideas
|
|
|
|
|
samerh wrote: i am trying to open an access application found on a server using System.Diagnostics.Process.Start(path).
So you want to open access application on you Server. Process will start process only on your server, not in the client system.
samerh wrote: it works fine when i run the project from VS2008 but when i deploy it doesnt work. Any ideas
What does not work? What error are you getting ? Is there is access permission error ?
|
|
|
|