|
|
<script type="text/javascript">
$(function() {
$(".showreply").click(function(evt) {
evt.preventDefault();
$(".reply").slideToggle('slow');
});
});
</script>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"
Width="988px" Height="35px" HorizontalAlign="Left" BorderStyle="None"
DataKeyField="id">
<AlternatingItemStyle BackColor="White" />
<ItemStyle BorderColor="#CCFFFF" BorderStyle="Solid" BorderWidth="2px" />
<HeaderStyle Height="0px" />
<ItemTemplate>
Reply By:
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>'
style="color: #990000" />
Department:
<asp:Label ID="DepttLabel" runat="server" Text='<%# Eval("Deptt") %>'
style="color: #990000" />
Designation:
<asp:Label ID="DesignationLabel" runat="server"
Text='<%# Eval("Designation") %>' style="color: #990000" />
<asp:Label ID="useridLabel" runat="server" Text='<%# Eval("userid") %>' />
<br />
<div style="border: 0px solid #C0C0C0; height:auto; background-color: #D9FDDE;">
<asp:Label ID="commentsLabel" runat="server" Text='<%# Eval("comments") %>' />
</div>
Posted On:
<asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date") %>' />
<br />
<div id="s1" style="width:123px; height:20px; background-color: #FF9933; float:left;" class="showreply">Post Reply</div>
<br />
<div class="reply" style="display:none">
<asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine" Height="75px"></asp:TextBox>
</div>
</ItemTemplate>
</asp:DataList>
It works but it slide(open) all div in datalist on click s1 div.
How to open div respective to s1 div at a time.
|
|
|
|
|
I think you should find something unique to identify the div.
for example
modify the s1 div to be run at server(this would give it unique values of id every single instant).
then add the id to the JQuery selector
$("#" + this.id + " div.reply").slideToggle('slow');
Good Luck
Help people,so poeple can help you.
|
|
|
|
|
Hi All,
Can any body help me with some code to send mail using smtp i have a code but mail is not send to a particular mail id. i have written a code as
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress("xyz@gmail.com", "ABC");
message.From = fromAddress;//here you can set address
message.To.Add("abc@gmail.com.com");//here you can add multiple to
message.Subject = "Feedback";//subject of email
message.Body = @"Plain or HTML Text";
smtpClient.Send(message);
}
catch (Exception ex)
{
lblmsg.Text = "ERROR : " + ex.Message;
}
this code works fine but mail is not been send.
Thanks in Advance
Elizabeth
|
|
|
|
|
Elizabeth Rani wrote: this code works fine
Really? Have ever looked at lblmsg ?
Nowhere did you set the Host , Port , EnableSsl , and Credentials properties of the SmtpClient . It must fail because of that.
Next, some mail providers check that the From property of the MailMessage is the address of the user identified by the UserName of the Credentials - in case of doubt, they'll refuse to send the mail.
|
|
|
|
|
Hi,
Can you help me some sort of code please.
Thanks in advance
|
|
|
|
|
Dim strMsg As String
strMsg = txtMessage.Text
If strMsg.Length >= 140 Then
strMsg = strMsg.Substring(1, 140)
End If
mTo = Trim(txtToNumber.Text) & _
Trim(cboCarrier.SelectedItem.ToString())
mFrom = Trim(txtFrom.Text)
mSubject = Trim(txtSubject.Text)
mMsg = Trim(txtMessage.Text)
mMailServer = ConfigurationManager.AppSettings.Get("MyMailServer")
mPort = ConfigurationManager.AppSettings.Get("MyMailServerPort")
Try
Dim message As New MailMessage(mFrom, mTo, mSubject, mmsg)
Dim mySmtpClient As New SmtpClient(mMailServer, mPort)
mySmtpClient.UseDefaultCredentials = True
mySmtpClient.Send(message)
MessageBox("The mail message has been sent to " & _
message.To.ToString())
Catch ex As FormatException
MessageBox("Format Exception: " & ex.Message)
Catch ex As SmtpException
MessageBox("SMTP Exception: " & ex.Message)
Catch ex As Exception
MessageBox("General Exception: " & ex.Message)
End Try
End Sub
|
|
|
|
|
Hi
i am running wcf service in IIS, when i make a POST request from the rest client with .net development environment server i am getting the break points hit and the service is responding but when i am accessing through IIS URL(http://localhost//Service/service.msc) it fails and i am not getting break points hit and getting message
HTTP/1.1 404 Object Not Found .
i am confused that why the service is not responding when i accessed the iis deployed service.
it will be very helpful if i am getting out from this issue.
thanks
|
|
|
|
|
Are you running the client on the same machine as the server? If not the localhost in the url is wrong.
Also the url contains two forward-slashes where they should not be: http://localhost//Service/service.msc
I assume this is a typo, but thought it worth mentioning just in case.
|
|
|
|
|
Yes i am accessing client on the same machine.
sorry typo error when composing a message but my REST client is having the following URL
http://localhost/Service/service.msc
Even i tried from different machine with the following
http://172.29.xxx.xx/Service/service.msc
In both scenarios i am getting the following page saying my service living but not able to post a request.
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http:
This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:
C#
class Test
{
static void Main()
{
CDataServiceClient client = new CDataServiceClient();
client.Close();
}
}
Visual Basic
Class Test
Shared Sub Main()
Dim client As CDataServiceClient = New CDataServiceClient()
' Use the 'client' variable to call operations on the service.
' Always close the client.
client.Close()
End Sub
End Class
when i try to access its method by the following
http://172.29.xxx.xx/Service/service.msc/methodcall
[method :POST]
{
"json format inputs"
}
modified 15-Feb-12 5:52am.
|
|
|
|
|
hello guys, please am currently designing a test website with asp.net(vb)and i also have webservice that i placed all my connections, but the problem am currently having is that whenever i run the webservice to test what i have done it always bring an error, please what can i do. below is the code am talking about.
<WebMethod()> Public Sub InsertInfo(ByVal Name As String, ByVal picbox As FileUpload)
Dim mycon As New SqlConnection(conStr)
Dim img As FileUpload = CType(picbox, FileUpload)
Dim imgByte As Byte() = Nothing
If img.HasFile AndAlso Not img.PostedFile Is Nothing Then
Dim file As HttpPostedFile = picbox.PostedFile
imgByte = New Byte(file.ContentLength - 1) {}
file.InputStream.Read(imgByte, 0, file.ContentLength)
End If
mycon.Open()
Dim cmdText As String = "Insert into tblSave([Name],picture) VALUES(@Name,@pix)"
Dim cmd As New SqlCommand(cmdText, mycon)
cmd.Parameters.AddWithValue("@Name", Name.Trim())
cmd.Parameters.AddWithValue("@pix", imgByte)
cmd.ExecuteScalar()
End Sub
|
|
|
|
|
What's the error message, in which line does it arise?
|
|
|
|
|
@bernhard hiller below is the error message
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.InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.]
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(INameScope scope, Accessor accessor) +849987
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(MemberMapping member, INameScope elements, INameScope attributes, Boolean isSequence) +84
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1553
[InvalidOperationException: There was an error reflecting property 'EnableTheming'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.Page'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) +139
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1273
[InvalidOperationException: There was an error reflecting property 'Page'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.WebControls.FileUpload'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +722
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +236
[InvalidOperationException: There was an error reflecting 'picbox'.]
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +843
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +130
System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess) +223
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +1971
[InvalidOperationException: Method Service1.InsertInfo can not be reflected.]
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +6527
System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +91
System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1798
System.Web.Services.Description.ProtocolReflector.Reflect() +703
System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +394
System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +109
System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +156
System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +284
System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) +50
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +77
[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +285
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +183
[InvalidOperationException: Failed to handle request.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +354
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +212
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
|
|
|
|
|
Hi Guys,
Are you still working on some ASP Classic codes?
I am working on file upload in ASP Classic (not ASP.Net). And I am declaring my form as follows:
Problem: (when using ENCTYPE="multipart/form-data)
Response.Write(Request.Form("txtSample")) '--- returns blank
of course removing the "multipart/form-data" will solve the issue, but I am working on file upload and I need that.
Is there a work around where I can get the value of input text after clicking the submit?
Thanks
hifiger2004
|
|
|
|
|
Hi to all,
How to withdraw money from PayPal.
Thanks
Farogh Haider
Web developer
|
|
|
|
|
Hi Experts,
I need to find whether the TLS is enabled or not. If it is not enabled, i have to show some message. Kindly guide me any sugessions.
Regards.
|
|
|
|
|
Assuming you don't mean Theatrical Lighting Systems or Top Law Schools, you still need to provide a bit more detail.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I have created a simple ASP.NET web application project in VS2010
Now I am just trying to add a web control but getting this error:
Could not find part of the path.....
Kindly Help...
|
|
|
|
|
|
i am designing share trading application in C# using asp.net framework, i wnna know how i should start it and which areas it must cover.kindly answer...!
|
|
|
|
|
You need to talk to someone who knows the domain and then ask him for advice on what to put into your application.
|
|
|
|
|
You could start with this[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
Our application receives datas from 2 application and it is stored in SQL database.
Some times in a table the column may be there or may not be there.Some times row may or may not be there.
How to handle such situation in asp.net?
I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures.
Guhananth.S
|
|
|
|
|
Did you check for number of columns and number of rows?
e.g.
DataTable dtData= YourClass.GetDataTable("select * from yourtableName");
if(dtData.Columns.Count==0){return;}
if(dtData.Rows.Count ==0){return;}
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
in that insert query fire and data to fetch connection class to use and easily get it
|
|
|
|
|