|
Hello. Thank you for trying to help.
Did you read my posts?
I said: I am using VS 2005. I have no OPTION for separate codefile. IT ALWAYS ALWAYS ALWAYS USES SEPARATE CODEFILE. If there IS a SEPARATE CODEFILE, why is it putting code in the aspx page?
I can send a screenshot if you want.
Sorry for yelling, but you're the 4th person to suggest that.
Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon
|
|
|
|
|
well the problem with you may be you are using an existing project and converted to vs2005. I dont think you have made that project from start in vs 2005... If you have done that, I am sure, you will get that option...
Now if you dont want to use codefile (It may have been produced while you add in your project), you can just omit the options
CodeBehind="yourfile.aspx.cs" Inherits="yourclass" of the Page Tag of aspx.
And if still its not creating inline server side script in aspx, you have to manually add the script tag with runat = server and write your C# code there..
I am sorry for not understanding you properly ... hope this works to you.
Abhishek Sur
|
|
|
|
|
I found the problem.
From your suggestion, I created a new web app project. It behaved the same (putting code in the aspx file not the .vb file).
I asked a co-worker if he had the same problem. He did not.
We compared versions, and I did not have SP1 for VS2005.
After installing that, it works properly now.
Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon
|
|
|
|
|
I got the following error as "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.".
I used "SqlDatasource" and i set the Timeout property as below,
e.Command.CommandTimeout = 10000;
But i am still getting this error. Please can anybody help me how to avoid this error?
|
|
|
|
|
Write more efficient queries, or raise the timeout even further.
|
|
|
|
|
Can i get the details more?. I used the select query with stored procedure.
|
|
|
|
|
Tell me, why would a simple select quert take more than 10 seconds to return? Selecting too much info? Badly indexed tables?
Without any code how could we help you?
|
|
|
|
|
sqldsCustomers.SelectCommand = "Select (ROW_NUMBER() OVER(ORDER BY Rq.ExpiryDate asc)) as 'Row Number'," +
" CONVERT(varchar(50),Rq.RequestId) as RequestId,CONVERT(varchar(50),Rq.UserId) as BuyerId,Ap.SellerId as SellerId,RUI.ScreenName as BuyerName,Evt.FutureEvent as Event,AUI.ScreenName as SellerName," +
" Ven.name as Venue,Rq.ShippingDate,Evt.Date as EventDate,Rq.ExpiryDate,Rq.date as RequestDate,Rq.Numtickets as Qty,Ap.Date as AcceptedDate," +
" dbo.GetUserSuggestedPrice(Evt.Id, Evt.VenueLayoutId,(SELECT TOP 1 ReqZones.ZoneId FROM FP_RequestedZones ReqZones" +
" WHERE ReqZones.RequestId = Rq.RequestId), 5) AS CurrentUserSuggestedPrice,Rq.UserSuggestedPrice,Rq.BidperTicket as Amount,St.description as Status,(Rq.NumTickets * Rq.BidPerTicket) as TotalTixCost from FP_AcceptedRequests Ap" +
" INNER JOIN FP_UserInfo AUI on AUI.Id=Ap.SellerId RIGHT OUTER JOIN FP_Request Rq on Rq.RequestId=Ap.RequestId INNER JOIN FP_Event Evt on Evt.id=Rq.EventId" +
" INNER JOIN FP_UserInfo RUI on RUI.Id=Rq.UserId INNER JOIN FP_Venue Ven on Ven.Id=Evt.VenueId INNER JOIN FP_StatusLov St on st.id=rq.StatusId where Rq.StatusId=1 and Rq.ExpiryDate>=getdate()";
Wile this query runs i got the Timed out error. And i need to set the timed out before the query excutes.
|
|
|
|
|
u may set SqlCommandObject.CommandTimeout property to ensure that the SQL never timesout from database calls....
Default is 20 seconds
Abhishek Sur
|
|
|
|
|
i want to write a Rich Textbox Component for web applications of asp.net 2.0,which i can frequently use in my future projects,like emailSystem etc..As Asp.net 2.0 doesnot contain RichTextBox control,like windows Applications.
so the point where i m confusing is that which project type should i select in Visual Studio 2005,either Windows Control Library,or web application project,which i can reference to my future projects..
|
|
|
|
|
it depends. A rich text like control is going to use a lot of javascript, OR it's going to not be a native web control. I'd say your best bet is to look for controls that already exist, the ones that do, use javascript and thus do not require special permissions from the end user to run.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Take a look at FreeTextBox, it's available from:
http://www.freetextbox.com.
Hope this helps
Tom
|
|
|
|
|
I want to disable back button of brower ...
Is any property like isBack like for postback the property isPostback is there....
|
|
|
|
|
sounds like you're going to spend a lot of time on your knees.
No, there's no such thing. There are hacks, and they annoy all your users except the ones smart enough to break them. Who are the ones you're worried about in the first place. Asking this question usually means your overall design is broken, a site should not care if the user uses the back button.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hey... I think if you open the page in a new window, and close the original page, the back button will be disabled....
Try this code for your need
<SCRIPT LANGUAGE="JavaScript">
function goNewWin() {
window.open("backbuttonnewpage.html",'TheNewpop','toolbar=1,
location=1,directories=1,status=1,menubar=1,
scrollbars=1,resizable=1');
self.close()
}
</SCRIPT>
<A HREF="javascript:goNewWin()">Open New Page</A>
you can also try doing this
Let Page A calls Page B
and user is not allowed to go to Page A from Page B.
Put the code below in Page A.
<Script>
window.history.forward(1);
</Script>
I think this will do...
Abhishek Sur
|
|
|
|
|
window.history.forward(1);
Add this script tag in Page.aspx Source code at he top under head tag
still not getting then revert back
Darshana Pathak
|
|
|
|
|
well you may write
<script>
window.history.forward(1)
</script>
to every window so that it will try to go forward on every pageload..
if it finds one forward level it will automatically go forward..
this helps you when user click on back button...
but this is not a good practice... but you can use.
Abhishek Sur
|
|
|
|
|
but if MasterPage is Used then no need to write it seperately on all pages
Just write it on MasterPage that will do
Darshana Pathak
|
|
|
|
|
I have made an application in asp.net and retrieve data to dropdownlist.
but my application is on network so, one user can update database which is bounded dropdownlistbox. So i want to update database without clicking any button or using timer control. How i can do this. Someone help me.
e.g. Like in sharekhan site where prices of shares are frequently changing.
|
|
|
|
|
piyush_patel1111 wrote: without clicking any button or using timer control
If you don't want to respond to an event, or create an event, such as with a timer, then your only other option is prayer.
I am sure the site you're speaking of, is using a timer and AJAX to make it's changes
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
AJAX is the only way of doing this.
there is an example of how a timer control would work on the ajax toolkit page. Basically it shows the time with the seconds updating live. This means that the page is making a partial postback every second. Using this would be the only way of having a live updated system.
|
|
|
|
|
but he said he doesn't want to use a timer.....
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: but he said he doesn't want to use a timer.....
Yes I can read.
I mentioned it because I was trying to explain in my arguement that this is the only real valid way of doing it.
Sometimes people say they cant use a certain method so that they can get other possible solutions. In this case he will just have to use a method he doesnt really want to use.
|
|
|
|
|
.netman wrote: AJAX is the only way of doing this.
No. There are other options too, but they are quite complex to implement.
Have you ever heard of Comet[^], Push Model etc.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi all,
This is my dataview
<asp:GridView ID="bcgrid" runat="server" DataKeyNames="testi_ID" EditRowStyle-Font-Size="XX-Small" EditRowStyle-Font-Bold="true" Font-Names="Verdana" Font-Size="XX-Small" ForeColor="DimGray" Width="368px" AutoGenerateColumns="False" HorizontalAlign="Center" >
<Columns>
<asp:TemplateField HeaderText="Language"><ItemTemplate>
<asp:Label ID="p" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.testi_Language").ToString() %>'>
</asp:Label></ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Description"><ItemTemplate>
<asp:Label ID="Lab" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.testi_Description").ToString() %>'></asp:Label>
</ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="Category"><ItemTemplate>
<asp:Label ID="Lab" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.testi_Category").ToString() %>'></asp:Label>
</ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="Title"><ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.testi_Title").ToString() %>' NavigateUrl='<%#GetUrl(DataBinder.Eval(Container, "DataItem.testi_Name").ToString()) %>'></asp:HyperLink>
</ItemTemplate> </asp:TemplateField>
</Columns>
<EditRowStyle Font-Bold="True" Font-Names="Verdana" Font-Size="XX-Small" />
<RowStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
</asp:GridView>
This is the function for databinding
public void GetData()
{
// Create Instance of Connection and Command Object
SqlConnection conn = new SqlConnection("data source=ADMIN-6CB835BC2\\SQLEXPRESS;initial catalog=Gospel;integrated security=SSPI;Trusted_Connection=Yes");
conn.Open();
string sqlselect = "select * from Testimonial";
SqlCommand myCommand = new SqlCommand(sqlselect, conn);
SqlDataReader result = myCommand.ExecuteReader();
bcgrid.DataSource = result;
bcgrid.DataBind();
if (bcgrid.Rows.Count == 0)
{
bcgrid.Visible = false;
lblInfn.Visible = true;
}
else
{
bcgrid.Visible = true;
}
}
How can i apply paging to this grid.I am totally confused .Help me out with detailed information.
|
|
|
|