|
Hi,
I want create a client application for an asmx webservice. I want to know which one is better, is it creating proxy manually using wsdl.exe tool or adding web reference of the asmx service to my application and using the automatically created proxy.
Performance wise which is better? Do I have to disconnet and dispose manually if I use wsdl proxy. Or is it automatically done in my if I use web reference. I am asking because I did web services a little only and some time before.
Please help me by giving some information. Thanks in advance. Any kind help is great any link or etc. I am also trying get from other sources too.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Neither.
Make WCF service with proxy from IoC container or handcoded.
No more Mister Nice Guy... >: |
|
|
|
|
|
I prefer wsdl.exe myself. Mainly because it reduces reliance on a proprietary setup in Visual Studio. I'm guessing Visual Studio will keep supporting web references in the future, but when I have the option of using a simple code file instead, I opt for the code file.
Also, after I generate the proxy using wsdl.exe, I clean out all the unnecessary stuff I don't use (namely, the async stuff).
|
|
|
|
|
Olá,
Estou usando FormsAuthentication pra logar em uma aplicação.
Em meu ambiente local, a aplicação autentica normalmente e na página restrita o Request.IsAuthenticated retorna true, o que já era esperado.
Porém no ambiente da hospedagem, o mesmo login autentica com o FormsAuthentication normalmente, mas o Request.IsAuthenticated retorna false.
Agora querem algo mais bizzaro? Se eu colocar qualquer parametro na QueryString: ?id=xpto ou ?xpto=xpto, qualquer coisa mesmo, o Request.IsAuthenticated retorna true.
Exite alguma relação do Request.IsAuthenticated com QueryString?
Preciso fazer isso funcionar. Ajudem aê!!
Eu não acredito que seja a hospedagem, pois tenho outra aplicação que autentica normalmente no mesmo servidor.
|
|
|
|
|
Since this is primarily an English speaking site, you will get a better response if you formulate your question in English.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Hello,
I am using FormsAuthentication to log into an application.
In my local environment, the application authenticates the page and usually restricted to Request.IsAuthenticated returns true, which was expected.
But in the hosting environment, it authenticates with the FormsAuthentication login normally but Request.IsAuthenticated false.
Now they want something more Bizzaro? If I put any parameters in QueryString:? Id = foo or? Foo = foo, anything at all, the Request.IsAuthenticated returns true.
Exite some relationship with the Request.IsAuthenticated QueryString?
I need to make it work. Aê help!
I do not believe it is hosting, because I have another application that authenticates usually on the same server.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Can Some One help me to resolve this error that i am geting on my application
I am using autogenerated code from Object Relational designer that is Name.designer.cs to connect to my sql database but i am getting this error
Default.aspx
<asp:GridView ID="GridView1" runat="server" Width="100%"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Trandate" HeaderText="Tran Date">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="deposit" DataFormatString="{0:F2}"
HeaderText="Deposit">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="withdraw" HeaderText="Withdraw" DataFormatString="{0:F2}" >
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="remarks" HeaderText="Remarks" />
</Columns>
</asp:GridView>
the code Behind (default.aspx.cs)
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
NameDataContext bdc = newNameDataContext();
GridView1.DataSource = bdc.RecentTransactions(
Decimal.Parse(Session["Number"].ToString()));
GridView1.DataBind();
Error 4 'NameDataContext' does not contain a definition for 'RecentTransactions' and no extension method 'RecentTransactions' accepting a first argument of type 'NameDataContext' could be found (are you missing a using directive or an assembly reference?) C:\Users\Default.aspx.cs 21 40
Is it that i have not referenced an assembly or dll file that is making me have that error of RecentTransactions....thanks
I am Grateful
|
|
|
|
|
Intellisense shows this error? Right?
If yes: then from where you get this method?
If not: check from what assembly is this method and add reference to that assembly.
No more Mister Nice Guy... >: |
|
|
|
|
|
Having problems updating INT field in MS SQL Server 2008 database from .NET web application using ASP and VB.net.
Server Error in '/DISCuSS' Application.
--------------------------------------------------------------------------------
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 81: Dim strfldRankNew As Int32 = RTrim(LTrim(e.NewValues("fldRank")))
Line 82:
Line 83: Dim strfldOnCallAnalystOld As Int32 = RTrim(LTrim(e.OldValues("fldOnCallAnalyst")))
Line 84: Dim strfldOnCallAnalystNew As Int32 = RTrim(LTrim(e.NewValues("fldOnCallAnalyst")))
Line 85:
Source File: C:\Users\gns1497\Documents\Visual Studio 2008\WebSites\DISCuSS\Dictionaries.aspx.vb Line: 83
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +204
Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +99
[InvalidCastException: Conversion from string "" to type 'Integer' is not valid.]
Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +257
Dictionaries.GvOnCall_Update(Object sender, GridViewUpdateEventArgs e) in C:\Users\gns1497\Documents\Visual Studio 2008\WebSites\DISCuSS\Dictionaries.aspx.vb:83
System.Web.UI.WebControls.GridView.OnRowUpdating(GridViewUpdateEventArgs e) +133
System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +720
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +704
System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +123
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
My VB.net Code:
Function SendSQLCommand(ByVal tsSQLCmd As String, ByVal tsqlConn As SqlConnection) As Integer
Dim iRetVal As Integer = -1
Dim sqlCmd As New SqlCommand(tsSQLCmd, tsqlConn)
If tsqlConn.State <> ConnectionState.Open Then
tsqlConn.Open()
End If
Try
iRetVal = sqlCmd.ExecuteNonQuery()
Catch ex As Exception
Throw ex
End Try
Return iRetVal
End Function
Protected Sub GvOnCall_Update(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs)
'Dim MgrPass As String
Dim keyValue As Integer = e.Keys("fldOCID")
Dim strfldOnCallGroupOld As String = RTrim(LTrim(e.OldValues("fldOnCallGroup").ToString()))
Dim strfldOnCallGroupNew As String = RTrim(LTrim(e.NewValues("fldOnCallGroup").ToString()))
Dim strfldStartOnCallOld As String = RTrim(LTrim(e.OldValues("fldStartOnCall").ToString()))
Dim strfldStartOnCallNew As String = RTrim(LTrim(e.NewValues("fldStartOnCall").ToString()))
Dim strfldEndOnCallOld As String = RTrim(LTrim(e.OldValues("fldEndOnCall").ToString()))
Dim strfldEndOnCallNew As String = RTrim(LTrim(e.NewValues("fldEndOnCall").ToString()))
Dim strfldRankOld As Int32 = RTrim(LTrim(e.OldValues("fldRank")))
Dim strfldRankNew As Int32 = RTrim(LTrim(e.NewValues("fldRank")))
Dim strfldOnCallAnalystOld As Int32 = RTrim(LTrim(e.OldValues("fldOnCallAnalyst")))
Dim strfldOnCallAnalystNew As Int32 = RTrim(LTrim(e.NewValues("fldOnCallAnalyst")))
'MgrPass = InputBox("Please enter the manager password.", "Password Required")
'If MgrPass = "manage" Then
gvOnCall_Updated(keyValue, strfldOnCallGroupNew, strfldStartOnCallNew, strfldEndOnCallNew, strfldRankNew, strfldOnCallAnalystNew)
'Else
'MsgBox("Only CSS managers may edit DISCuSS.", MsgBoxStyle.Critical, "Authentication Failed")
'End If
'http://support.microsoft.com/kb/301248
'http://www.codeproject.com/Questions/334429/how-to-create-a-combobox-in-grid-view-control
End Sub
Protected Sub gvOnCall_Updated(ByVal fldOCID As Integer, ByVal fldOnCallGroup As String, ByVal fldStartOnCall As String, ByVal fldEndOnCall As String, _
ByVal fldRank As Integer, ByVal fldOncallAnalyst As Integer)
Dim sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("DiscussSQLConnectionString").ConnectionString)
Dim sSql As XElement
sSql = <sql>
Update [tblOncallAnalystSchedule] SET [fldOnCallGroup] = '<%= fldOnCallGroup %>',
[fldStartOnCall] = '<%= [fldStartOnCall] %>',[fldEndOnCall] = '<%= [fldEndOnCall] %>',
[fldRank] = '<%= [fldRank] %>', [fldOnCallAnalyst] = '<%= [fldOncallAnalyst] %>'
Where [fldOCID] = '<%= [fldOCID] %>' </sql>
'MsgBox(Err.Description, MsgBoxStyle.Critical, "SQL Error")
SendSQLCommand(sSql.Value, sqlConn)
sqlConn.Close()
End Sub
I use this same "SendSQLCommand" function with another form and it works fine. I pass the values from one sub to the other in the other form as well and that works fine. It just doesn't work on this form when performing an update and it appears that its due to the INT field. In SQL Server 2008 Mgmt Studio the field shows as type "INT", but I cant define the field as "INT" on the asp side. I have to use INT16, INT32, etc.
ASP Code for the Data Source:
<asp:SqlDataSource ID="dsOncallGroup" runat="server"
ConnectionString="<%$ ConnectionStrings:DiscussSQLConnectionString %>"
SelectCommand="SELECT tblOnCallAnalystSchedule.fldOnCallGroup, tblOnCallAnalystSchedule.fldStartOnCall,
tblOnCallAnalystSchedule.fldEndOnCall, tblOnCallAnalystSchedule.fldRank, tblOnCallAnalystSchedule.fldOnCallAnalyst,
tblOnCallAnalystSchedule.fldOCID, tblEmployee.fldEmpLastName +', ' + tblEmployee.fldEmpFirstName as 'Analyst'
FROM tblEmployee INNER JOIN tblOnCallAnalystSchedule
ON tblEmployee.fldEmpID = tblOnCallAnalystSchedule.fldOnCallAnalyst
WHERE (tblOnCallAnalystSchedule.fldOnCallGroup = @fldOnCallGroup)
AND (tblOnCallAnalystSchedule.fldEndOnCall > GETDATE())
ORDER BY tblOnCallAnalystSchedule.fldOnCallGroup, tblOnCallAnalystSchedule.fldEndOnCall,
tblOnCallAnalystSchedule.fldRank"
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues"
DeleteCommand="DELETE FROM [tblOnCallAnalystSchedule] WHERE [fldOnCallGroup] = @original_fldOnCallGroup"
InsertCommand="INSERT INTO [tblOnCallAnalystSchedule] ([fldOnCallGroup], [fldStartOnCall], [fldEndOnCall], [fldRank], [fldOnCallAnalyst]) VALUES (@fldOnCallGroup, @fldStartOnCall, @fldEndOnCall, @fldRank, @fldOnCallAnalyst)"
UpdateCommand="UPDATE [tblOnCallAnalystSchedule] SET [fldOnCallGroup] = @fldOnCallGroup, [fldStartOnCall] = @fldStartOnCall,
[fldEndOnCall] = @fldEndOnCall, [fldRank] = @fldRank, 'Analyst' = @'Analyst'
WHERE [fldOCID] = @fldOCID">
<SelectParameters>
<asp:ControlParameter ControlID="cboOncallGroup" Name="fldOnCallGroup"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="original_fldOnCallGroup" Type="String" />
<asp:Parameter DbType="DateTime2" Name="original_fldStartOnCall" />
<asp:Parameter DbType="DateTime2" Name="original_fldEndOnCall" />
<asp:Parameter Name="original_fldRank" Type="Int32" />
<asp:Parameter Name="original_fldOnCallAnalyst" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="fldOnCallGroup" Type="String" ConvertEmptyStringToNull="false" />
<asp:Parameter DbType ="DateTime2" Name="fldStartOnCall" />
<asp:Parameter DbType ="DateTime2" Name="fldEndOnCall" />
<asp:Parameter Name= "fldRank" Type="Int32" />
<asp:Parameter Name= "fldOnCallAnalyst" Type="Int32" />
<asp:Parameter Name="original_fldOnCallGroup" Type="String" ConvertEmptyStringToNull="false" />
<asp:Parameter DbType="DateTime2" Name="original_fldStartOnCall" />
<asp:Parameter DbType="DateTime2" Name="original_fldEndOnCall" />
<asp:Parameter Name= "original_fldRank" Type="Int32" />
<asp:Parameter Name= "original_fldOnCallAnalyst" Type="Int32" />
<asp:Parameter Name= "fldOCID" Type="Int32" />
<asp:Parameter Name= "original_fldOCID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="fldOnCallGroup" Type="String" />
<asp:Parameter DbType="DateTime2" Name="fldStartOnCall" />
<asp:Parameter DbType="DateTime2" Name="fldEndOnCall" />
<asp:Parameter Name="fldRank" Type="Int32" />
<asp:Parameter Name="fldOnCallAnalyst" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
Here's the ASP code for my gridview that I am using to display the data:
<asp:Gridview ID="gvOnCallSchedule" runat="server" AllowSorting="True" AllowPaging="True" showfooter="true"
OnRowUpdating="GvOnCall_Update" onRowCommand="gvOnCallSchedule_RowCommand" DataKeyNames="fldOCID"
BackColor="Aqua" DataSourceID="dsOncallGroup" Font-Bold="True"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" ForeColor="#333333" HorizontalAlign="Justify"
CellPadding="4" GridLines="None" PageSize="20" AutoGenerateColumns ="false" Allowusertoaddrows="true"
OnSelectedIndexChanged="cboOnCallGroup_SelectedIndexChanged">
<Columns>
<asp:TemplateField ShowHeader="false">
<FooterTemplate>
<asp:ImageButton ID="AddButton" runat="server" CommandName="Insert" ImageURL="~/images/New.png"
Text="Add" ToolTip="Add New On Call Record" />
</FooterTemplate>
<EditItemTemplate>
<asp:ImageButton ID="UpdateButton" runat="server" CausesValidation="False" CommandName="Update"
ImageUrl="~/images/Save.png" Text="Update" ToolTip="Update" />
<asp:ImageButton ID="CancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
ImageURL="~/images/Cancel.png" Text="Cancel" ToolTip="Cancel" />
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
ImageUrl="~/images/Edit.gif" Text="Edit" ToolTip="Edit" />
<asp:ImageButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
ImageUrl="~/images/Delete.png" Text="Delete" ToolTip="Delete" />
</ItemTemplate>
<ItemStyle Wrap="false" />
</asp:TemplateField>
<asp:TemplateField headertext="On Call Group">
<ItemTemplate>
<asp:DropDownList ID="ddlOCGroup" width="250px" runat="server" datavaluefield="fldOnCallGroup" Enabled="false"
DataSourceID= "dsListbox" SelectedValue="<%# Bind('fldOnCallGroup') %>">
</asp:DropDownList>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ftrddlOCGroup" width="250px" runat="server" datavaluefield="fldOnCallGroup"
DataSourceID= "dsListbox" SelectedValue="<%# Bind('fldOnCallGroup') %>">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField headertext="Start Date/Time">
<ItemTemplate>
<asp:Textbox ID="txtStartOnCall" runat="server" Text='<%# Bind("fldStartOnCall") %>'>
</asp:Textbox>
<asp:Image ID="calpopup" runat="server" ImageUrl="~/images/calendar2.png" />
<asp:CalendarExtender ID="StartOnCallCal" runat="server" TargetControlID="txtStartOnCall"
PopupButtonID="calpopup" PopupPosition="Right" format="MM/dd/yyyy hh:mm:ss tt">
</asp:CalendarExtender>
</ItemTemplate>
<FooterTemplate>
<asp:Textbox ID="txtStartOnCallFtr" runat="server" Text='<%# Bind("fldStartOncall") %>'>
</asp:Textbox>
<asp:Image ID="calpopupFtr" runat="server" ImageUrl="~/images/calendar2.png" />
<asp:CalendarExtender ID="StartOnCallCalFtr" runat="server" TargetControlID="txtStartOnCallFtr"
PopupButtonID="calpopupFtr" PopupPosition="Right" format="MM/dd/yyyy hh:mm:ss tt">
</asp:CalendarExtender>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField headertext="End Date/Time">
<ItemTemplate>
<asp:Textbox ID="txtEndOnCall" runat="server" Text='<%# Bind("fldEndOnCall") %>'>
</asp:Textbox>
<asp:Image ID="calpopup2" runat="server" ImageUrl="~/images/calendar2.png" />
<asp:CalendarExtender ID="EndOnCallCal" runat="server" TargetControlID="txtEndOnCall"
PopupButtonID="calpopup2" PopupPosition="Right" format="MM/dd/yyyy hh:mm:ss tt">
</asp:CalendarExtender>
</ItemTemplate>
<FooterTemplate>
<asp:Textbox ID="txtEndOnCallFtr" runat="server" Text='<%# Bind("fldEndOnCall") %>'>
</asp:Textbox>
<asp:Image ID="calpopup2Ftr" runat="server" ImageUrl="~/images/calendar2.png" />
<asp:CalendarExtender ID="EndOnCallCalFtr" runat="server" TargetControlID="txtEndOnCallFtr"
PopupButtonID="calpopup2Ftr" PopupPosition="Right" format="MM/dd/yyyy hh:mm:ss tt">
</asp:CalendarExtender>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField headertext="Call Order">
<ItemTemplate>
<asp:Textbox ID="lblCallOrder" runat="server" Text='<%# Bind("fldRank") %>'>
</asp:Textbox>
</ItemTemplate>
<FooterTemplate>
<asp:Textbox ID="txtCallOrderFtr" runat="server" Text='<%# Bind("fldOnCallGroup") %>'>
</asp:Textbox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="On Call Analyst">
<ItemTemplate>
<asp:DropDownList ID="ddlAnalyst" runat="server" datavaluefield="Analyst"
DataSourceID= "dsAnalyst" SelectedValue="<%# Bind('Analyst') %>">
</asp:DropDownList>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlAnalyst" runat="server" datavaluefield="Analyst"
DataSourceID= "dsAnalyst" SelectedValue="<%# Bind('Analyst') %>">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:Gridview>
|
|
|
|
|
Read exceptions tracks carefully.
"[InvalidCastException: Conversion from string "" to type 'Integer' is not valid.]"
You have bad casting in you method GvOnCall_Update
No more Mister Nice Guy... >: |
|
|
|
|
|
|
Dim strfldRankNew As Int32 = RTrim(LTrim(e.NewValues("fldRank")))
LTrim and RTrim cut off leading and trailing blanks from a string. They return a string. Not an Int32. You could use Int32.Parse() - better use If Int32.TryParse()... and show a useful error message to the user when it fails!
|
|
|
|
|
Member 9328847 wrote:
Dim sSql As XElement
sSql = <sql>
Update [tblOncallAnalystSchedule]
SET [fldOnCallGroup] = '<%= fldOnCallGroup %>',
...
</sql>
SendSQLCommand(sSql.Value, sqlConn)
Using an XElement to build your dynamic query won't prevent SQL injection[^]. You need to use a parameterized command instead.
Also, your code is trying to execute exactly the same query that's set for the UpdateCommand of the SqlDataSource control. If you remove the event handler, the control will perform the update for you.
Finally, the MsgBox calls will never work; if they did, the message box would appear on the server, where nobody would ever see them, and your page would be stuck waiting for someone to click "OK".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
i want to ask about google analytics, is it ok to keep the script in the site.master's <head> or i have to put it in every individual page?
|
|
|
|
|
Yeah it's okay.
No more Mister Nice Guy... >: |
|
|
|
|
|
Debes colocarlo en el master.page de tu sitio. En la sección ...
_______________________
Edward J. Ocando. | Desarrollador | SoyDesarrollador.net
Telefono. +58 (416) 164.34.88 | Edward.Ocando@soydesarrollador.net
|
|
|
|
|
I want a video player for my website, that is capable of playing all forms of videos from database. Can anyone suggest me name of source code for the same.
|
|
|
|
|
|
Hi. I am using Microsoft Chart control (.Net 3.5) for a report. Its working good. But when my label text is too long, its not showing full text. Is there any text wrap property in MS Chart Control or please advise me how can it would be done.
|
|
|
|
|
|
I use model view presenter approach for ASP.NET web site. The presentation part is compiled in separate class library where view contracts and presenters are defined:
MyPresentation assembly
IMyView
{
DisplayText(string text);
}
MyPresenter
{
public IMyView View { get; set; }
public DisplayText()
{
string text = Generate();
View.DisplayText(text);
}
}
MyWebApplication assembly
public partial class MyForm : System.Web.UI.Page, IMyView
{
public void DisplayText(string text)
{
this.myLabel.Text = text;
}
...
protected void myButton_Click(object sender, EventArgs e)
{
Presenter.DisplayText();
}
}
However after stepping out of Presenter.DisplayText() Text property of myLabel becomes null again as though no assignment were done. By all means if you replace the only line in myButton click event with direct setting of myLabel Text property everything stays assigned.
Чесноков
|
|
|
|
|
And what is doing method Generate()?
No more Mister Nice Guy... >: |
|
|
|
|
|
returns string of letters
Чесноков
|
|
|
|
|
I am asking because I am trying to work out something. But... huh whatever.
I would say that you just setting text in another instance.
No more Mister Nice Guy... >: |
|
|
|
|
|
Hello
I have a new requirement as follows. Its an webapplication depends on external systems and sqlserver to pull and push data. We have to develop that app both in ASP.NET Web application and for an IPAD. UI will be almost same for both ASP.NET web application and for IPAD.
So can any body suggest me the best possible ways so that some core business logic can be reused for both Webapplication and for IPAD
|
|
|
|
|