|
|
hello,
I got one bug in my site developed using C# and asp.net
If we right clicked on the LinklButton We get Options like "Open in new window and Open in new Tab" in case of IE (7.0). But when we select one of them, say tab,then page doesn't open actually in new tab but it opens in the same tab.
same if we selectd open in new window it opens in the same window.
Moreover in case of Mozilla Firefox browser we don't even get options like "Open in new window and Open in new tab".
If we use Hyperlink then both these options work fine on both the browsers.
But Hyperlink control doesn't have Click event so we can't use it.
So two meet both the requirements what to do.
Hope you undrstood my problem. Please guide.
Thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
The LinkButton isn't strictly speaking a normal hyperlink, it runs some javascript in the onlick event that causes the form to post back. Firefox correctly realises this and doesn't give you the "open in new tab" option, and in IE it doesn't work because there is no link to open, only the code to run when its clicked (which it what happens).
Short answer is that "open in new tab" will only work for navigational links (ie ones that actually point to another URL).
The ASP HyperLink control doesn't have a click event because its supposed to be used for naviation, although if you use an HTML <a> tag with runat="server" you will get an onserverclick event (which basically turns it into a LinkButton).
What are you trying to use the LinkButton for? Are you running some code in the Click handler or just redirect?
|
|
|
|
|
Hello,
I have to migrate my asp.net 1.1 application to 2.0
in 1.1 i have use Cache to store HasheTable and this scenario work
fine in 1.1 but above case not work in ASP.NET 2.0 some time means
cache may be clear sometimes not every time.please give me a solumn
rahulpatel
|
|
|
|
|
Why are you using the Cache ?
There are many ways to store value
you can use Viewstate,Session,or create a datacontainer class that will store the list of objects and do state management
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
but i need above answer of the cache bcoz its problem in live site and want to fix imediately
|
|
|
|
|
I set my control tabindex from the first control to teh last control on my web form. On running the webform, and pressing teh tab to move from one control or the other, after the first control, it jumps to the address bar of the internat explorer
Any help will be appreciated
t.aransiola
|
|
|
|
|
Hi
Just set tab index of all controls to 0. By default tab will come automatically in order of the links, address bar, controls and buttons etc..
Harini
|
|
|
|
|
Hi...
If i press signout i am redirecting to logout page, there if i click browser back button then it is was showing all the previous pages which i navigated through from login page.
To avoid this i used fallowing code in the page_load event of all the pages which i dont want to show when i click browser back button.
Response.Buffer=true;
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl ="no-cache";
But my problem is, when i press sign out button and then if i click browser back button it is not showing the pages which i used above code, but before signout if i press browser back button then also it is not showing the previous pages which i navigated through from login page, i dont want to happen this. when i signout then only i want to happen this.
Like what exactly is happening in yahoomail.com. before signout we can navigate through previous pages using browser back button but not after signout.
Please help me regarding this its very urgent for me...
Pradeep Reddy
|
|
|
|
|
|
thank u...
Pradeep Reddy
|
|
|
|
|
take one aspx page
on html side
on window_onload event of page
write
window.navigate("signin.aspx")
or
window.location.replace("Signin.aspx")
and
in each form
when u signout
redirect to this new page
i hope this will solve ur problem
all the best
|
|
|
|
|
hi sir,
really u saved my life todat. m thankfull to u sir.
Pradeep Reddy
|
|
|
|
|
hi friend I to faced the same problem i found out solution by placing the code in the last page...the one which is before signout one
ADD THIS CODE IN LASTPAGE IT DISABLES BROWSERS BACK BUTTON
if(window.history.forward(1) != null)
window.history.forward(1);
and add a page sign out completely ....
came out of hardwork
|
|
|
|
|
Wow - that's nasty.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thank u...
Pradeep Reddy
|
|
|
|
|
i think you should check the user credentials at each page
If user clicks sign out then make all values null ;
then on each page load event check the values is null or not .
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Wow !!! Different answers for a single Questions.
That's nice to see differnt answers for a single Problem.
Regards,
Satips.
|
|
|
|
|
Dear All,
I'm new to the web-programming and ASP.NET. I need to align different elements (datagrid, textboxes etc.) on the user control and have a control over them during the execution. (move a control below the datagrid according to the number of rows there, etc.)
Is it possible to anchor elements to each other like you do in Win Forms?
If possible I'd prefer to have a solution with C#, rather than html or smth.
Thank you very much.
|
|
|
|
|
Web pages are completely different to WinForms. It is possible to do what you want but I promise you it won't work in the VS designer. C# is server-side and so has no effect on the positioning of controls once sent to the client. You want to look at CSS, and yes it means getting involved in some HTML as well.
|
|
|
|
|
Hi,
How to host a wcf service in an asp.net 3.0 application.
I have written a code but its not working can u provide a solution for this.
I have created a wcf service named test123
and MService is my classname
MyOperation is a methodname
i have added this webreference in my asp.net application
and i am trying to call this method but its not working
protected void Button1_Click(object sender, EventArgs e)
{
test123.MyService a = new test123.MyService();
string w = a.MyOperation1("Hello");
TextBox1.Text = w.ToString();
}
Thanks
Glenn D'souza
Software Engineer
Quest Informatics
|
|
|
|
|
Hi Everybody ...
This is naresh
iam developing online exam application,...
here ive some problem to Insert a Stopwatch...
that stop watch will useful wen the total time reaches the maximum time of the exam that page will automatically navigate to another page ....
i need help for inserting the stop watch while he is writing the exam
Iam using Web user control for my examination question paper (i.e, .ascx file ) .
i donno how to insert stop watch there and the functionality also i donno...
i tried in many cases but am not getting the expected result ...
plz help ...
Thanks in Advance
Naresh
|
|
|
|
|
To do it on the client, it needs to be done in javascript. It would then be easily hacked. Another option is to make AJAX calls that just check if the time has elapsed, but to store the starting time in the session, on the server, so it is secure.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi ...
Thanks 4 ur answer but the problem is ::::::::::
ive JavaScript editor ....
i got all the clock controls in javascript editor ...
in that one control "Redirect Clock " , its very useful but the problem is that ....
" wen iam in the first question it is showing that max num of seconds ive given in java script ...
but wen i click on NEXT Question button the page will automatically refreshes and the second question will comes ... so for that question also am getting the same max time .... the problem is that if the page refreshes the stopwatch restarts again .... "
In this case only i confused wat to do ?
n one more ,,,, iam very new to dotnet , and i donno abt AJAX ,, i never used in any project ..
waiting 4 ur answer ...
bye
naresh
|
|
|
|
|
Well Naresh
There might be many techniques to solve this problem. But I think you can insert invisible iframe(height=0,width=0) say "refresh.aspx" to all of your Pages.
Now refresh the page "refresh.aspx" using
Response.AddHeader("Refresh", "60")
At PageLoad event you can use some session variables to store time left, time spent etc. Hope it will solve your problem.
|
|
|
|