|
|
|
My 1: Please read the existing answers and make sure you aren't reposting a link that already exists in another answer.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
How to send SMS using Web services ASP.NET C#
|
|
|
|
|
You need API from your SMS provider. Nothing special, just you need to call API function from your web service.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I've no idea about it sooo
www.facebook.com/raazak47
|
|
|
|
|
hi friends,
i have a very specific need for my new project and even logical explanation will do the job . I want to show repeated gridview data in a column with seperated commas and i am also using onrowcreated and rowdatabound methods for multiple headers of gridview from this example:
http://www.dotnettwitter.com/2010/12/how-to-create-multiple-row-header-and.html[^]
i also tried grouped gridview example from here:
GroupedGridview - A Customized GridView Control[^]
but this doesnt fix my needs as i want data like this:
database fields/values from query:
Column_groupid | Group_users | designation | Period
58 Matt Admin 5
58 Andrew Admin 5
58 Sachin Admin 5
58 Dinesh Admin 5
59 Sara SuperAdmin 2
59 John SuperAdmin 2
as you can see the name field is changing while others are distinct (which may change but not an issue for now); now i want to display the data in gridview as:
Sr_no | Group_Persons | designation | Period
1 Matt, Andrew, Admin 5
Sachin, Dinesh
2 Sara,John SuperAdmin 2
how can i solve this problem currently i am thinking of using list and filling it in asp:table but i am afraid of performance issues.
thanks & Regards
Alok Sharma
Once their was a rumor, then it became reality...........
|
|
|
|
|
Hello,
I really dont know this will help you or not..
But still i want to give my try..
you can try to get your solution by sql query..
Below to create test table
CREATE TABLE [ForTest](
[id] [int] NULL,
[id2] [int] NULL,
[vak] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
INSERT [dbo].[ForTest] ([id], [id2], [vak]) VALUES (1, 1, N'abc')
INSERT [dbo].[ForTest] ([id], [id2], [vak]) VALUES (1, 1, N'xyz')
INSERT [dbo].[ForTest] ([id], [id2], [vak]) VALUES (2, 2, N'pqr')
INSERT [dbo].[ForTest] ([id], [id2], [vak]) VALUES (2, 2, N'mno')
and below query to get result as per you wish..
SELECT
distinct P.id,
STUFF
(
(
SELECT ',' + vak
FROM ForTest M
WHERE M.id = P.id
ORDER BY id
FOR XML PATH('')
), 1, 1, ''
) AS Models
FROM
ForTest P
Hope this will work for you...
KiranKumar Roy
|
|
|
|
|
Hi all, can someone please explain what the Eval expression in the following gridview syntax does.
<asp:TemplateField HeaderText="ID" >
<ItemTemplate>
<asp:HyperLink ID="hlID" runat="server" Text='<%# EVAL("ID") %>' NavigateUrl='<%#"Default.aspx?ID=" + EVAL("ID") %>'/>
</ItemTemplate>
</asp:TemplateField>
In the NavigateURL property, I understand that Default.asx is a file name but what does the expression ID=" + EVAL("ID") do? Thanks in advance for your reply.
|
|
|
|
|
|
Hi, thanks for replying. I still have one question about the Eval expression. What happens when the hyperlink is clicked due to the fact that the ID' field of the datasource is bounded to the text property of the hyperlink? Is the ID sent to the Default.aspx page when the hyperlink is clicked? Thanks in advance for your reply.
modified 16-Sep-12 3:45am.
|
|
|
|
|
No. It's just the text field that is bounded to field in Eval method. It's not sent to anywhere when hyperlink is clicked. You can take/consider it as a runtime text assignment.
|
|
|
|
|
Hi All,
My problem is i am binding around 8,000 records in the gridview and the problem is it is taking more than a min to display data onto the browser. I know one solution can be to use Paging but client does not want paging as he has to search something in grid using ctrl + F feature of the browser. My question is can i load data in a gird view asynchronously just to make the reterieving of data somewhat faster or like as i scroll down in the grid it fetches next set of records without freezing the screen. I have seen this type of feature applied in various E-Commerce sites.
Can you please help me.
Best Regards
Rohit
|
|
|
|
|
Hi Rohit,
It is really surprising to see your client's requirements. However I even agree to the fact that requirements will always be wierd from a developer point of view. It is anyways a bad idea to show all the records at once. What would you do if the number of records increase to 20K or to 1 million? I would suggest you convince your client, get the paging implemented for the gridview. Another option would be, give a search functionality in the page. Based on the search criteria load the relevant records.
Look at the following links, all of them suggest to use paging. Second link talks about some Telerik control, which loads records on demand by scroll. You can check it out.
Loading records in the grid view while scrolling down,No Paging technique.[^]
displaying-large-gridviews-efficienty-in-asp-net[^]
Thanks & Regards,
Vani Kulkarni
|
|
|
|
|
as the above answer suggest giving all data at once is not a good practice , why not convince your client to use search from gridview (you can provide search box above gridview) IMHO you should convince him/her for that because as the records will increase the performance of your project will go down with time no matter what you use (Async or not) because even browser apps take space in memory and soon with so much data if its not a good system, the browser will start crashing(Personal experience)
regards
Alok sharma
sometimes noobs perform better but its sheer luck...
|
|
|
|
|
Hi all, if I bind my datatable which contains the path of a file or files in a folder on the web server, to a gridview like the following, I will get a gridview with file paths inside of it.
DataTable myTable = new DataTable("myData");
myTable.Columns.Add("URL", typeof(string));
string[] fileEntries = Directory.GetFiles(Server.MapPath("~/Uploads/"));
int linkL = 0;
foreach (string fileName in fileEntries)
{
myTable.Rows.Add("~/Uploads/" + Path.GetFileName(fileName));
linkL++;
}
myGrid.DataSource = myTable;
myGrid.DataBind();
As it stands, the code snippet above successfully allows users to download a file by clicking on its path inside of the URL Column of the Gridview. So basically if the file from the web folder is Test.txt I would see the following path in the URL column:
"~/Uploads/Test.txt
But what if I want to change the name Test.txt to a different name and still be able to download the fie? I have tried to change Test.txt to something else by inserting a new name in the path but I get an error message saying that the new file is not found. Any suggestions will be greatly appreciated, thanks for your help.
|
|
|
|
|
ASPnoob wrote: I get an error message saying that the new file is not found. Then you need to investigate why the path that you are providing does not match an existing file.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I have created a server control in asp.net that generate dll and we can use it an any another application we need. It is so helpful.
Now I want to create server control type of application in PHP and ASP.NET MVC 3.
Can you provide me some sample application or example for PHP and ASP.NET MVC 3, so that I am able to achieve my task.
Please reply ASAP.
Thanks in Advance.
|
|
|
|
|
I have an ASP.net\AJAX 4.0 forms application that is having a performance issue. The app is hosted on go daddy shared hosting servers. Intermittently (about half the time) a page request hangs for a significant amount of time. I have run lots of tracing on it and found that the hangup is happening before the request even gets to the server. I have setup ASP.net tracing to spit out a timestamp gathered during the application.begin_request event. An example of a typical scenario I am observing is that I request a page at 00 seconds and get the response at 30 seconds. ASP.net tracing tells me that application.begin_request (via the timestamp) started at 27 seconds and the entire page cycle took less than 3 seconds to complete.
I also traced with the Internet Explorer 9 F12 debug feature and if I look at the timings tab (in detail view) I observe that all of the hangup time is occuring in what Internet Explorer is calling the "Start" event - the description is "The time from when the request was initially created to when the request is sent".
So my question is, does anybody know what would cause requests to intermittently get held up in the browser like that? It does not happen in development (only from hosted site) and occurs from multiple types of browsers and multiple PCs - so it is not isolated to a particular browser environment.
|
|
|
|
|
|
Those are good reads as I was not familiar with that but unfortunately to use those would require a lot of code re-writing. I am confident that this latency is not from AJAX. I have run tracing in fiddler, dynaTrace, and IE and in all cases the tools report a responsive site in all ways other that this strange random latency in the pre-request state. I really need to simply identify what is going on during the browser start\wait period on the random page requests that experience latency. However it seems that there is no information about anyone having a similar situation anywhere on the web.
|
|
|
|
|
Hi,
I have WCF ServiceA and WCF ServiceB. ServiceA is calling ServiceB. Both of them are using BasicHttp binding. But I am getting the exception with message as below. When I am trying to call the ServiceA and ServiceB individually from a test page both of them are working fine.
But I want to call ServiceB from ServiceA. I am not using the ServiceReference to call the serviceB I am calling the Service in the following way
Code to create the Service proxy
Imports System.ServiceModel
Imports System.ServiceModel.Web
Imports System.ServiceModel.Description
Public Class ServiceFactory(Of T)
Public Shared Function GetBasicHttpChannelForService(ByVal source As String) As ChannelFactory(Of T)
Dim factory As ChannelFactory
Dim result = String.Empty
Try
'Get the channel from WCF
Dim address As EndpointAddress = New EndpointAddress(source)
Dim binding As BasicHttpBinding = New BasicHttpBinding()
binding.MaxReceivedMessageSize = 2147483647
binding.ReaderQuotas.MaxArrayLength = 2147483647
binding.MaxBufferPoolSize = 2147483647
binding.CloseTimeout = New System.TimeSpan(1, 1, 1)
binding.OpenTimeout = New System.TimeSpan(1, 1, 1)
binding.ReceiveTimeout = New System.TimeSpan(1, 1, 1)
binding.SendTimeout = New System.TimeSpan(1, 1, 1)
If factory Is Nothing Then
factory = New ChannelFactory(Of T)(binding, address)
ElseIf factory.State = CommunicationState.Closed Then
factory = New ChannelFactory(Of T)(binding, address)
ElseIf factory.State = CommunicationState.Faulted Then
factory.Close()
factory = New ChannelFactory(Of T)(binding, address)
ElseIf Not factory.State = CommunicationState.Opened Then
factory.Close()
factory = New ChannelFactory(Of T)(binding, address)
End If
Catch ex As Exception
End Try
Return factory
End Function
Public Shared Sub CloseChannelFactory(ByRef factory As ChannelFactory)
If Not factory Is Nothing Then
If factory.State <> CommunicationState.Closed Then
factory.Close()
End If
factory = Nothing
End If
End Sub
End Class
And in the test page's load even I am creating the Service proxy in the following way
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim factory As ChannelFactory(Of IStayAtWorkService)
'GetMessages(New Guid("b14bc077-f1df-457c-9f7e-7cb9e0bc1cf3"))
'Dim factory As ChannelFactory(Of IStayAtWorkService)
Try
factory = ServiceFactory(Of IStayAtWorkService).GetBasicHttpChannelForService _
(ConfigurationManager.AppSettings("StayAtWorkServiceAddress"))
Dim sawService As IStayAtWorkService = factory.CreateChannel()
Dim inputFileBytes() As Byte
Dim inputFile As String = ConfigurationManager.AppSettings("InputFiles")
Using fstream = New FileStream(inputFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Using br As BinaryReader = New BinaryReader(fstream)
inputFileBytes = br.ReadBytes(fstream.Length)
br.Close()
End Using
fstream.Close()
End Using
Dim fUpload As New RequestFile()
fUpload.FileName = inputFile
fUpload.FromDiv = "Accordian1"
fUpload.ImageBytes = inputFileBytes
fUpload.RequestId = 2
Dim d = sawService.SaveRequestFile(fUpload)
GridView1.DataSource = d
GridView1.DataBind()
Catch ex As Exception
Finally
ServiceFactory(Of IStayAtWorkService).CloseChannelFactory(factory)
End Try
End Sub
Where am I missing, doesnt WCF support calling one service from another service or is it because I am creating service client for serviceB by using runtime mechanism. Please give me some solution. I would be really really thankful. When I am able to call individually why am I not able to call one service from another service. Please help me in fixing it. Following is the error message I am getting.
The remote server returned an unexpected respo
nse: (400) Bad Request.
And Stack TRace is :
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at WA.LNI.StayatWork.Service.IStayAtWorkService.SaveRequestFile(RequestFile fUpload)
at WA.LNI.StayatWork.Public.UI.WebServiceTestPage.Page_Load(Object sender, EventArgs e) in D:\source\SourceCode\StayatWork-VS2010\WA.LNI.StayatWork.Public.UI\WebServiceTestPage.aspx.vb:line 157
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I have a C# 2010 web application that is having problems displaying a few items from the master pages. Thus I need to be able to determine what the issue. Due to that fact, I have the following questions:
1. F12 Developer Tools look like they can be used to analyze what a problem is. Can you tell me where I can obtain a copy of the F12 Developer Tools? Are the part of Visual Studio.net 2010 professional edition? If so, can you tell me what part of the install I would obtain the F12 developer tool from?
2. If the F12 Developer Tools are not part of visual studio, can you tell me where I can download the tool from?
3. Do you have directions I can follow on how to use this tool?
|
|
|
|
|
I'm confused.
You have the source code to the web application. Right?
Why can't you use VS2010 to debug the application?
|
|
|
|
|
I am having problems with the master page markup. It is not displaying correctlty. I am hoping you can tell me how to see where there are problems with master pages that contain html and css pages.
|
|
|
|
|