|
You can use Response.Redirect("your navigate page here");
|
|
|
|
|
Ya i know that
Still i need few ways to get that like thru code not giving directly like response.redirect("http://www.microsoft.com");
Thats y i mentioned in the Question that in how many ways we can get that?n which will be better?
|
|
|
|
|
Hello friends,
I have to display subtotal, vat,total in gridview footer. I am doing like this but nothing is displayed.
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" <br />
CellPadding="4" Font-Names="Verdana" Font-Size="Small" ForeColor="#333333" <br />
PageSize="900" Width="600px" EmptyDataText="No items in your cart!!" <br />
DataKeyNames="REF" GridLines="None" ShowFooter="True" <br />
onrowdatabound="GridView1_RowDataBound"><br />
<FooterStyle BackColor="#1C5E55" ForeColor="#FFFFFF" Font-Bold="True" /><br />
<RowStyle BackColor="#E3EAEB" /><br />
<Columns><br />
<asp:BoundField DataField="REF" HeaderText="REF" SortExpression="REF" <br />
ItemStyle-Width="60px" ><br />
<ItemStyle Width="60px"></ItemStyle><br />
</asp:BoundField><br />
<asp:TemplateField HeaderText="product_id" Visible="False"><br />
<ItemTemplate><br />
<asp:Label ID="lblProduct_Id" runat="server" Text='<%# Eval("REF") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<asp:BoundField DataField="Description" HeaderText="Description" <br />
SortExpression="Description" ItemStyle-Width="300px" ><br />
<ItemStyle Width="300px"></ItemStyle><br />
</asp:BoundField><br />
<asp:TemplateField HeaderText="Description" Visible="False"><br />
<ItemTemplate><br />
<asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description")%>' ></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<asp:TemplateField HeaderText="QTY"><br />
<ItemTemplate><br />
<asp:TextBox ID="TxtQTY" runat="server" Width="30px" Text='<%# Eval("QTY") %>' /><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" <br />
ItemStyle-Width="80px" ><br />
<ItemStyle Width="80px"></ItemStyle><br />
</asp:BoundField><br />
<asp:TemplateField HeaderText="Price" Visible="False"><br />
<ItemTemplate><br />
<asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price")%>' ></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<asp:BoundField DataField="Cost" HeaderText="Cost" SortExpression="Cost" <br />
ItemStyle-Width="80px" ><br />
<ItemStyle Width="80px"></ItemStyle><br />
</asp:BoundField><br />
<asp:TemplateField HeaderText="Cost" Visible="False"><br />
<ItemTemplate><br />
<asp:Label ID="lblCost" runat="server" Text='<%# Eval("Cost")%>' ></asp:Label><br />
</ItemTemplate><br />
<FooterTemplate><br />
<asp:Label ID="lblSubTotal" runat="server" ForeColor="#ffffff" /><br />
</FooterTemplate><br />
</asp:TemplateField><br />
<br />
<asp:TemplateField HeaderText="Select"><br />
<ItemTemplate><br />
<asp:CheckBox ID="chkSelection" runat="server" /><br />
</ItemTemplate><br />
</asp:TemplateField><br />
</Columns><br />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" /><br />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" /><br />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /><br />
<EditRowStyle BackColor="#7C6F57" /><br />
<AlternatingRowStyle BackColor="White" /><br />
</asp:GridView><br />
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblCost = (Label)e.Row.FindControl("lblCost");
float price = float.Parse(lblCost.Text);
tprice += price;
}
if (e.Row.RowType == DataControlRowType.Footer)
{
Label lblSubTotal = (Label)e.Row.FindControl("lblSubTotal");
lblSubTotal.Text = tprice.ToString();
}
}
Please assist where I am doing wrong...
cheers,
sneha
|
|
|
|
|
Hi Sneha
you need to basically debug the GridView1_RowDataBound function.
In my opinion
Label lblSubTotal = (Label)e.Row.Cells[4].FindControl("lblSubTotal");
|
|
|
|
|
thanks for the reply Nishant. I did what you said but didn't get the results. On debugging the label control is showing the value but not in the browser. Unable to sort out the problem.
cheers,
sneha
|
|
|
|
|
|
Member 4219169 wrote: test
I am unable to understand what you want to say.
cheers,
sneha
|
|
|
|
|
Have you work on the discussion forum
|
|
|
|
|
Yes but I didn't understand this thing
cheers,
sneha
|
|
|
|
|
Hi Sneha,
I suggest you 1st give a hardCoded value Such (as your Name or mu Name ) to the label
and check whether the label is getting rendered .......
|
|
|
|
|
I already assisned "hello" to the text property of the label, but again it is not showing.
cheers,
sneha
|
|
|
|
|
<asp:TemplateField HeaderText="Price" Visible="False">
Why there Visible=False ????
|
|
|
|
|
I am extremely sorry. Yes this is the reason.I am so dumb.
Thanks for your support..
cheers,
sneha
|
|
|
|
|
It's Ok Ma'am .....
Sometimes we overlook the most obvious of Mistakes .......
admittingly I have committed Dumber mistakes in my initial days of my career
So cheer up
|
|
|
|
|
Thank you Nishant for your support.
cheers,
sneha
|
|
|
|
|
I have a WCF Service library written in .NET 4.0. I have a WCF application (in order to host this service in IIS) within the same solution. It contains the WCF library assembly reference and a service.svc file pointing to the service from the library along with a web.config that is a replica of the WCF service library's app.config. The WCF application is set to host the service in IIS7 (the virtual directory has been set). The same solution contains an ASP.NET Webforms solution to which I have added a service reference pointing to the WCF service I hosted in IIS (as mentioned).
When i start an instance of this ASP.NET Web application, I get a message saying that "The WCF service has been hosted" and the ASP.NET application can access the data from it correctly. However, when i try and access this data via a service reference added to an MVC 2 Web Application on the same machine in a different solution (pointing to the service hosted in IIS), I get a "The remote server returned an error: (405) Method Not Allowed." protocol exception . However, the MVC application is able to access the service data if I manually invoke an instance of the WCF Application that I was using to host the WCF Service Library from the other solution.
I am using VS2010 Beta 2 as my development IDE. I have been stuck with this issue for a while now. Any help would be appreciated.
My service config is as follows:-
<system.serviceModel>
<services>
<service behaviorConfiguration="CruxServices.BasicSearchServiceBehavior"
name="CruxServices.BasicSearch.BasicSearch">
<endpoint address="" binding="wsHttpBinding" name="WSBindingEndpoint" bindingConfiguration="WSBindingConfig"
contract="CruxServices.BasicSearch.Interfaces.IPropertyListFilter">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" name="MexEndpoint"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/CruxServices" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CruxServices.BasicSearchServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WSBindingConfig">
<security mode="None">
<transport clientCredentialType="None"/>
<message establishSecurityContext="false"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
|
|
|
|
|
Please use this form[^]
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
i had a file upload control,2 buttons and ddl.
one button to insert uploaded image to database and the other to view image as thumbnail..
after i browse the image and before it is stored in db if any postback occurs the filename in textbox dissappears.
once i click on view button image appears but path dissappears before image is inserted in db...
|
|
|
|
|
Yes it's problem with fileupload control. You can seperate controls by iframe.
|
|
|
|
|
how any sample code pls...
|
|
|
|
|
Read about iframes and try to implement that. It may be not suitable for your scenario.
|
|
|
|
|
i am using ASP.Net with c# to develop dynamic web site with backend(database)of mysql and when i search sample code of third membership provider, i got one from this site(The Code Project) and i used it as the steps telling me but when i run my asp.net configuration the error says Could not load type 'Andri.Web.MySqlMembershipProvider'. i couldn't understand it. what shall i do could someone telling me please? i am just a beginer for all of the things, i just doing things by reading reference.
|
|
|
|
|
I think the article that you are using should have some Dll. Check if all the references are loaded correctly. And also read the article, if there is something written on this.
Clearly Andri.Web.MySqlMembershipProvider is a custom written assembly. You need to contact the Author for more help.
|
|
|
|
|
Thank you for your reply.
The article that i used doesn't have dll but has two class which should be pasted to the App_Data folder of my project and made me modification of two items:
<rolemanager defaultprovider="MySqlRoleProvider"
="" enabled="true" .
="" .
<providers="">
<clear>
<add
name="MySqlRoleProvider"
="" type="Andri.Web.MySQLRoleProvider" .
="" .="" <="" providers="">
AND
<membership defaultprovider="MySqlMembershipProvider"
="" userisonlinetimewindow="15">;
<providers>
<clear>
<add
name="MySqlMembershipProvider"
="" type="Andri.Web.MySqlMembershipProvider" .
="" <="" providers="">
in my web.config file.
I also read the article many times and i cross check what i did is according to the steps listed.
And how do i contact the author?
Forum for Article: Membership and Role providers for MySQL
Author: Rakotomalala Andriniaina
|
|
|
|
|
I found the article from where you're implementing that. In point 3, the author is asking to add two files to App_Code folder, those file can be download from the link provided at the top namely 'Download source files'
Don't forget to mark 'Good Answer', if you find it really a good one 
|
|
|
|