|
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
view code:
<asp:GridView ID="grdBusScheduling" runat="server" ForeColor="#333333" DataKeyNames="DetailID" OnRowCommand="grdBusScheduling_RowCommand" OnRowEditing="grdBusScheduling_RowEditing" OnRowDataBound="grdBusScheduling_RowDataBound"
AutoGenerateColumns="False" CellPadding="5" Visible="False" DataSourceID="SqlDataSource1">
<EmptyDataTemplate>
<b>There is no Bus Schedule</b>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<%#Eval("ForDate", "{0:dd-MMM-yyyy}")%>
<%--<%#DataBinder.Eval(Container.DataItem,"ForDate", "{0:dd-MMM-yyyy}")%>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FareForAdult" HeaderText="Fare For Adult" />
<asp:BoundField DataField="FareForChild" HeaderText="Fare For Child" />
<asp:BoundField DataField="FareForSr" HeaderText="Fare For Senior" />
<%--<asp:BoundField DataField="OpenStatus" HeaderText="Open" />--%>
<asp:TemplateField HeaderText="Open">
<ItemTemplate>
<%#Eval("OpenStatus")%>
</ItemTemplate>
</asp:TemplateField>
<%--Testing--%>
<asp:TemplateField Visible="false" HeaderText="Pick-up Point"><%-- SortExpression="Position" >--%>
<EditItemTemplate>
<asp:ListBox ID="lstCityArea" Width="200" Height="100" runat="server" SelectionMode="multiple" >
<asp:ListItem Value="0" Text="ChandPole"/>
<asp:ListItem Value="1" Text="ChandPole1"/>
<asp:ListItem Value="2" Text="ChandPole2"/>
<asp:ListItem Value="3" Text="ChandPole3"/>
<asp:ListItem Value="0" Text="ChandPole"/>
<asp:ListItem Value="1" Text="ChandPole1"/>
<asp:ListItem Value="2" Text="ChandPole2"/>
<asp:ListItem Value="3" Text="ChandPole3"/>
</asp:ListBox>
</EditItemTemplate>
</asp:TemplateField>
<%--*********--%>
<asp:CommandField ShowEditButton="True" HeaderText="Edit" />
</Columns>
<FooterStyle BackColor="#003366" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#003366" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#003366" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringTravel %>"
SelectCommand="BusDetailSelectByFields" SelectCommandType="StoredProcedure"
UpdateCommand="BusDetailEditByDetailID" UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="ddlCityFrom" Name="CityFromID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlCityTo" Name="CityToID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlBusType" Name="BusTypeID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlVendor" Name="VendorID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="ddlBus" Name="BusID" PropertyName="SelectedValue"
Type="Int64" />
<asp:ControlParameter ControlID="Date1" Name="FromDate" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="Date2" Name="ToDate" PropertyName="Text" Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForAdult" Type="Int64" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForChild" Type="Int64" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="FareForSr" Type="Int64" />
</UpdateParameters>
<%--<UpdateParameters>
<asp:Parameter Name="DetailID" Type="Int64" />
<asp:Parameter Name="OpenStatus" Type="Double" />
</UpdateParameters>--%>
</asp:SqlDataSource>
You get the best out of others when you give the best of yourself.
|
|
|
|
|
this validation will be work fine but i am using the gridview within the update panel so the validation not work..
how to check the gridview validation
var grid =document.getElementById("<%#GridView1.ClientID %>");
|
|
|
|
|
Hi friends,
I've designed an application in my local system using VS.NET 2005.
(C#.NET and ASP.NET)
Its working fine. Now, I want to publish to my IIS.
How can I publish to server? Which files are needed to transfer?
If I copy here also like that, Its giving error.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section 'connectionStrings'
<!-- Web.Config Configuration File -->
<configuration>
<configuration>
Line 3: <connectionstrings>
Line 4: <add name="Personal" connectionstring="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providername="System.Data.SqlClient" />
Line 5: <remove name="LocalSqlServer" />
Can anybody suggest me how to publish asp.net website?
thanking you
Vasvai
|
|
|
|
|
Member 4599972 wrote: how to publish asp.net website?
From Visual Studio -> Right Click on your web folder - > Click on publish.
Then inside your application there would be a Precompiled Folder, inside that your published folder will be there.
Then just Copy that Folder to intetpub - > wwwroot
Go to IIS -> Convert it to Virtual Direcotry and set the settings and run.
if your deploying IIS7.0 then you can check on my article
Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0
if you have any doubts you can ask me !!!
|
|
|
|
|
HI Thanks for reply,
I copied my solution into wwwroot folder. Again i am getting this error. While publishing it is copied into wwwroot folder.
Vasvai
|
|
|
|
|
did you application run correctly from local enviroment ?
|
|
|
|
|
Yes, i run it, it is working fine in localhost.
Vasvai
|
|
|
|
|
Just check which frame work your application is referring. I guess its referring 1.1 framework.
To change the version , open IIS, right click of the project folder,go to properties.
In the ASP.NET tab you will find the version its referring.
Hope this helps....
When you fail to plan, you are planning to fail.
|
|
|
|
|
yes, this can be a issue. but for that he will not get problem in web.config.
may be there is problem with his web.config file !!!
|
|
|
|
|
I am getting the problem in Web.Config, only.
Vasvai
|
|
|
|
|
|
did you close ConnectionString Tage ?
Member 4599972 wrote: AttachDBFilename=|DataDirectory|Personal.mdf
Why this ?
|
|
|
|
|
I put an aspxhtmleditor control in an aspx page.if we type in the textarea and allow bold and some other property to the text.I want to send the text in the changed format to another user.The text will appear as follws.How i change the html format and view the text to the user in the chenged format itself.
Sreejith
For example if we apply format in gmail message and send it to another person,the message will display in the same format as we typed.How can i change the text programaticcaly.
|
|
|
|
|
I want to write a text at certain angle at a web page. What is the way ? I am using C~(HASH) and asp.net.
|
|
|
|
|
you can create text and image at runtime with proper angle and the display on web pages.
|
|
|
|
|
How I can create image at run time, eg, I have text "Abhijit Jana is .net guru", I want to write this text at a billboard, (located any where at my web page). Now billboard surface is ANGULAR. How I may write text with italic, bold and 24 red font .
Please provide detailed answer. Thanks for your early help.
|
|
|
|
|
Ahmad99 wrote: Abhijit Jana is .net guru
He clearly isn't
Bob
Ashfield Consultants Ltd
|
|
|
|
|
How to auto upload files using asp.net with c# without using controlfile upoload? Plz reply me any one
|
|
|
|
|
It's not possible. ASP.NET won't get permissions to read files kept on client's machine. What is wrong in using "File Upload" control?
BTW, you can use ActiveX controls, but that has nothing to do with ASP.NET.
|
|
|
|
|
Search CodeProject articles. I found one on FTP there, the other day.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
i added a crystal report to my asp.net.. but when i try create an object i cant access it
i want to say: CrystalReport objRpt = new CrystalReport ();
But i cant do this..
ended up using this code:
ReportDocument rpt = new ReportDocument();
string reportPath = Server.MapPath("CrystalReport .rpt");
rpt.Load(reportPath);
rpt.SetDataSource(ds);
CrystalReportViewer.ReportSource = rpt;
CrystalReportViewer.DataBind();
CrystalReportViewer.Visible = true;
CrystalReportViewer.HasExportButton=true;
Thanks
|
|
|
|
|
And your question is?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Your guess is as good as anyone's about any question in that OP...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
In his/her post I didn't get idea what is the question.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
My question is seeing as ive tried every possible solution to display report in asp.net and its not working. can someone please help me out by providing me with a solution..
|
|
|
|