|
Hi
I am implementing Routing in my ASp.NET Web Form Application (.NET 4.0). I guess, Routing always consider the same protocol where the request is coming form. I mean, if my browsing page has url as 'https://www.myDomain.com/login.aspx' and if I have a link in this page which points to a Route, then, my application will redirect to the routing page (by clicking the link) which will be of 'https' protocol. (right ?), in that case, how can I enforce my application to use 'http' protocol in the redirected page using Routing ?
I want to generate the routing url from my code. I learned GetRouteUrl(string routename, routeparameters) will generate the url for me, but how can I get absolute url with http or https for a route ?
Please help!
|
|
|
|
|
Hi
I have a listview inside a DIV which shows the scroll bars. At one time, let's say, 10 rows can be seen. I scroll down and click Edit on 25 row. To my surprise, the scroll goes to the first row (although if I go back to 25th row, the row is in edit mode)
My issue, how I can make sure that the scroll bar maintains its position to 25th row after clicking on Edit button?
Please advise. Thanks
AJ
<style>
.StopScroll1{
Z-INDEX: 20; POSITION: relative;left:-1px; TOP: expression(document.getElementById("divGrid1").scrollTop);
}
</style>
<div id="div1" style="position: relative; width: 100%; width: 700px; height: 200px;
margin: 0px; padding: 0px; overflow: auto; overflow-x: scroll; overflow-y: scroll">
<asp:ListView ID="ListView1" runat="server
OnSorting="Sorting"
OnItemEditing=" EditList"
>
<LayoutTemplate>
<table class="TableReleative TableFH" style="width: 97.5%;" cellspacing="0" cellpadding="0"
runat="server" id="tblGrid">
<tr style="height: 20px;" class="StopScrollTL" runat="server" id="thGrid">
<th style="text-align: center;">
</th>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
.....
</ItemTemplate>
<EditItemTemplate>
.....
</EditItemTemplate>
</asp:ListView>
</div>
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Looks like you page gets a postback when you click the edit link.
If so, try to set the Page.MaintainScrollPositionOnPostBack Property to true to return the user to the same position in the client browser after postback. (i.e. enabling smart navigation, see if it works!)
If not, you will have to use javascripts in order to restore the scrolls. For that, before postback, you need to store the scroll position in a variable and then after page reloads, set it back.
|
|
|
|
|
Hi ,
I am make simple application that send mail automatically after ending week .... so i don't know where i write my code ... what i do i am write my code in button and when i click on button , message sent to all members but i want this done automatically without admin clicks ... just sets date and message sent .
|
|
|
|
|
You want a Windows Service.
Make a Windows Service and just deploy it on a server. It's just that you need to connect to the same database that your application is connecting. It's the database content or configuration settings done in Windows Service that will act a trigger for emails and not application.
You need to communicate with DB using same connection string as you used in your application for saving/reading data.
There will be no manual steps involved. You will be able send email automatically every week.
|
|
|
|
|
you need to create a windows service and deploy it to the server once done you can schedule this windows service to send mails as per your requirments
Regards,
Jamil
Check my latest article
|
|
|
|
|
You can solve your issue by using two methods.
1> you have to create window service, deploy it and install it on server
2> you have to create SQL Job n upload it on server
Hope this solution will help you
|
|
|
|
|
|
Yes, it is called Google.
|
|
|
|
|
Hi all!
I need code upload Video by ASP Classic. Plase help me
Hello
|
|
|
|
|
|
|
tek 2009 wrote: but the probleme the rendering is that i need to click on each cell contains order number to a page number clicked
You just made a mess out here. Your question is not at all clear of what you want to do and what is the issue. Please rephrase/update the question with what you are looking at.
|
|
|
|
|
I have some knowledge in Crystal Report. I have needed to create report in crystal report in Matrix form, i.e. table grows horizontally and vertically, But i have no idea how to create such report.
Please provide me some ideas to create such reports.
|
|
|
|
|
|
Hi,
I got 2 solutions to find out if the web application is in debug mode or not.
Solution 1:
if(HttpContext.Current.IsDebuggingEnabled)
{
}
Solution 2:
CompilationSection compilSec = (CompilationSection)ConfigurationManager.GetSection("system.web/compilation");
if(compilSec.Debug)
{
}
I am confused, which solution is better !! For me, the first solution is very appealing, but I am not sure if there is any limitation or performance issue with the first solution and so I should choose the second one ?
Regards
|
|
|
|
|
What are you trying to accomplish? Are you attempting to run some code only in debug? The usual method is to use the #DEBUG preprocessor directive. That way the code is not compiled into the release, decreasing the size and improving performance.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Actually, I handle Application_Error event in Global.asax page and check if the application is not in Debug mode, then, Redirect the user to a customer error page, otherwise, show the error so that I can debug. I made a Windows Utility Application which has functionality such that, it can connect to FTP, download the web.config file, change the debug mode to either TRUE or FALSE and then upload the web.config file again to the server. For some reason, if my application crash in the production server, I run my Windows Utility Program to change the Debug mode to TRUE and then, I see the stack trace and error message immediately. This utility saves me from opening the Visual Studio, edit the config file, open FTP program, upload etc...etc..
So, will #debug directive work in this scenario ? So far I know, #debug directive is for Visual Studio, but when my web application recompile for new Web.Config file in the Server, will that respect the #debug directive ? I am not sure!
|
|
|
|
|
No #debug won't help in this case. I think the windows app is a bit overkill. Just edit the file with an ftp app, no need for VS.
You haven't described what errors you are getting.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks Mark,
I use FileZilla, and FileZilla does not have this feature to edit file in the server. Maybe some commercial FTP clients do. I just saved the money by creating this Windows App.
I am not talking about any specific error, I am saying, many times, if my Web Application crashes with un handled exceptions, then using that Windows App, I can immediately change to debug mode and see the error message.
Anyway, thanks a loot for bearing with me, giving me suggessions from your time.
Regards.
|
|
|
|
|
hi all,
when my page postedback after asp save button click it run the save another time,
if you save 1 book1
it will save twice
how to solve this problem?
thanks alot
|
|
|
|
|
DON'T post the same question again, once is enough. If anyone chooses to answer they will.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Are you sure you are not calling the save method twice? or you use cmd.ExecuteNonQuery() twice?
Paste the code you use and let's review it together.
|
|
|
|
|
Check the following in your code:
1-are you sure you are not saving a new book in the Page_load event of the page?
2-are you sure you are not calling the save method twice?
3-make sure that the procedure is saving one book.
if you want you can post your code to fix the issue.
|
|
|
|
|
hi all,
i develope a web site over visual studio 2005, when i press the save button (server side button) and the operation success, if i press F5 or refreh for the page
then the server side button event executed again and insert the same data.
how i can solve this problem?
thanks alot
|
|
|
|