|
hmm interesting solution rahul....
|
|
|
|
|
Hi ,
We have created a new Webservice , in this service we are using exterenal webservice in this webservice wsdl namespce tage () is empty and getting this error : "Schema item 'import' from namespace ''. The namespace attribute cannot have empty string as its value.could you please assit me
Thanks,
Vinay
Vinay
|
|
|
|
|
Try regenerating the proxy (from the webservice again).
If you use the svcutil command, you can use the /namespace setting to define your own namespace.
Read more about this command tool here[^].
|
|
|
|
|
I am not using any tool to create proxy. I am expecting the proxy to get autogenerated when i do webreference from our project.
what namespace i have to mention in this tag "<xs:import namespace="">" currently which is present as empty in the WSDL we go from external service. For this whether I ave to work anything from our side or I ave to ask the external service guys only to solve this.
Error 1 Unable to import binding '*****' from namespace '******'. App_WebReferences/****/
Error 2 Schema item 'import' from namespace '****'. The namespace attribute cannot have empty string as its value. App_WebReferences/*****/
i am getting above two errors.
Please assist me...
Vinay
|
|
|
|
|
SALAM all. im doing a RESTful web service with ASP.net, and i have a problem when invoking few of web service that i've created. here is the architechture of my solution: BLL ==> i put in it my functions like this:
public static List<transaction> getTransaction(string ID)
{
var query = from v in SMARTDBEntities.Instance.transactions
where v.compteID == ID
select v;
if (query.Count() == 0)
{
return null;
}
else
{
return query.ToList();
}
}
DAL ==> I used generation item to create model.edmx Entity ==> i used POCO generation code to generate entitys from data base.
and in my service.cs classe i put on it my web services like this:
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "Service/transactions/{cptID}")]
public List<transaction> getTransactions(string cptID)
{
return detailCompte.getTransaction(cptID);
}
and to make the response object serializable i add in the poco.context.cs Constructors
this.ContextOptions.ProxyCreationEnabled = false;
Now when i want to call my web service from my browser, an intermittent error appear. sometimes it work and displays for me the list of transaction and sometimes (most of time) it doesn't work, and displays to my an error:
Error 324 (net :: ERR_EMPTY_RESPONSE): The server terminated the connection without sending data.
I'm working with vista pack1
have you any idea for the way to fix this problem. thank youuuuu
zied JOUINI
|
|
|
|
|
Hi,
I've got a problem to manipulate a button outside of a updatepanel. I will try to clarify my problem as good as possible.
I've got an aspx page, with an usercontrol in it. In the usercontrol there's an updatepanel.
Now, there's a button in the ascx and when the button is clicked, I want to enable a other button on the aspx. So, the button that should be enabled is outside the ascx and the updatepanel. I'm able to call the method in C# to enable the button, but nothings happens. I thank because there's an updatepanel?
Does anybody know how I can fix this?
Thanks in advance!
Mark
|
|
|
|
|
Mark Vlaeminck wrote: the button that should be enabled is outside the ascx and the updatepanel.
Put this button in another update panel. Have a async trigger defined in it for previous button click. This would complete the design. Now, whenever the button1 is clicked, this update panel will be invoked and refreshed.
|
|
|
|
|
Hi! I am trying to change the checked attribute of dynamically created html radio button in asp.net using jquery. I tried different methods but I am not able to change the attribute.
My aspx page is as follows,
<%@ Page Title="" Language="C#" MasterPageFile="~/FormMaster.master" AutoEventWireup="true"
CodeFile="ArabiaHRLetterSurveyForm.aspx.cs" Inherits="HRLetter_Arabia_ArabiaHRLetterSurveyForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="latest" style="width: 98%; margin-left: 10px; margin-right: 10px">
<span class="corner-right">
<div class="actions">
<a href="#" class="status" id="lnkHistory" style="color: #fff">History</a></div>
HR Letter Survey Form </span>
</div>
<div style="width: 98%; margin-left: 10px; margin-right: 10px;">
<div>
<table cellpadding="0" cellspacing="0" width="100%" class="tableClass">
<tr class="trClass" align="right">
<th class="full" colspan="5">
Header
</th>
</tr>
<tr class="trClass" style="width: 100%">
<td class="first" style="width: 20%">
Request No
</td>
<td class="last" style="width: 80%">
<a href="#" class="status" id="lnkRequestNo" style="color: Blue" target="_blank">
<%=Request["requestid"]%></a>
</td>
</tr>
</table>
</div>
</div>
<div id="div_survey" runat="server" style="width: 98%; margin-left: 10px; margin-right: 10px;">
</div>
<div>
<table align="center">
<tr>
<td class="innerTd">
<a href="#" id="btnSubmit" runat="server" class="button-small" onserverclick="btnSubmit_Click">
<span class="corner-right-small">Submit</span></a>
</td>
</tr>
</table>
</div>
<asp:HiddenField ID="hUserIdEncrypted" runat="server" />
<asp:HiddenField ID="hInitiatorUserId" runat="server" />
<asp:HiddenField ID="hSurveyId" runat="server" />
<script type="text/javascript">
$("#lnkRequestNo").attr("href", "ArabiaHRLetterRequest.aspx?requestid=" + <%=Request["requestid"]%> +"&userId= " + $("#<%=hUserIdEncrypted.ClientID %>").val());
$("#lnkHistory").fancybox({
'width': 700,
'height': 400,
'autoScale': true,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe'
});
$("#lnkHistory").attr("href", "ArabiaHRLetterSurveyFormHistory.aspx?surveyid=" + $("#<%=hSurveyId.ClientID %>").val());
$("#<%=btnSubmit.ClientID %>").click(function(ev) {
ev.preventDefault();
var id;
var selected;
$("#<%=div_survey.ClientID %> tr:not(:has(th))").each(function() {
$(this).find("td").each(function() {
var o = $(this);
var firstCol = o.parent().children().first();
id = firstCol.text();
selected = "N/A";
firstCol.next().next().find("input").each(function() {
if($(this).is("checked")) {
if($(this).val() == "YES")
selected = "YES";
else if($(this).val() == "NO")
selected = "NO";
else if($(this).val() == "N/A")
selected = "NA";
}
});
firstCol.next().next().find("textarea").each(function() {
selected = "TextArea";
});
});
alert(id);
alert(selected);
});
});
$("input").each(function() {
$(this).click(function(ev) {
alert($(this).val());
if($(this).val() == "YES")
{
$("input[value='YES']").attr('checked', true);
$("input[value='NO']").attr('checked', false);
$("input[value='N/A']").attr('checked', false);
}
else if($(this).val() == "NO")
{
$("input[value='YES']").attr('checked', false);
$("input[value='NO']").attr('checked', true);
$("input[value='N/A']").attr('checked', false);
}
else if($(this).val() == "N/A")
{
$("input[value='YES']").attr('checked', false);
$("input[value='NO']").attr('checked', false);
$("input[value='N/A']").attr('checked', true);
}
//$('#Yes').attr("checked",false).checkboxradio("refresh");
//$("input[type='radio']").attr("checked",true).checkboxradio("refresh");
//$('input[name="yes_no_na0"]').attr('checked', false);
//$(this).next().attr('checked', false);
//$(this).next().next().attr('checked', false);
});
});
</script>
</asp:Content>
My code behind file is as follows,
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using GWC.ToolKits;
using System.Data.Linq;
using System.Linq;
using System.Text;
using System.Windows;
public partial class HRLetter_Arabia_ArabiaHRLetterSurveyForm : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
}
protected void Page_Init(object sender, EventArgs e)
{
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindQuestions();
hInitiatorUserId.Value = EncryptDecrypt.EncryptDecrypt.GetDecryptedData(Request["userId"]);
hUserIdEncrypted.Value = Request["userId"];
var m1 = Database.GetSurveyId(Request["requestId"]);
hSurveyId.Value = m1.survey_id.ToString();
var m = Database.GetSurveyId(Request["requestid"]);
}
}
private void BindQuestions()
{
StringBuilder surveytable = new StringBuilder();
var m = Database.GetQuestions();
if (m.Count > 0)
{
surveytable.Append("<table cellpadding='0' cellspacing='0' width='100%' class='tableClass'>");
surveytable.Append("<tr class='trClass' align='right'>");
surveytable.Append("<th class='full'>Id</th><th class='full'>Questions</th><th class='full'>Answers</th>");
surveytable.Append("</tr>");
if (m.Count > 0)
{
for (int i = 0; i < m.Count; i++)
{
surveytable.Append("<tr class='trClass' style='width:100%'>");
surveytable.Append("<td class='first' style='width:5%'>" + m[i].question_id + "</td>");
surveytable.Append("<td class='first' style='width:60%'>" + m[i].question_description + " </td>");
if (m[i].question_type_id == 1)
{
surveytable.Append("<td class='last' style='width:35%'>");
surveytable.Append("<input id=\"rdoYes" + i + "\" name=\"yes_no_na" + i + "\" value=\"YES\" checked=\"false\" type=\"radio\">YES</input>");
surveytable.Append("<input id=\"rdoNo" + i + "\" name=\"yes_no_na" + i + "\" value=\"NO\" checked=\"false\" type=\"radio\">NO</input>");
surveytable.Append("<input id=\"rdoNa" + i + "\" name=\"yes_no_na" + i + "\" value=\"N/A\" checked=\"true\" type=\"radio\">N/A</input>");
surveytable.Append("</td>");
}
else
{
surveytable.Append("<td class='last' style='width:35%'>");
surveytable.Append("<Textarea id=\"txtComment" + i + "\" type=\"text\" runat=\"server\" style='width:98%; height:100px'></Textarea>");
surveytable.Append("</td>");
}
surveytable.Append("</tr>");
}
}
surveytable.Append("</table>");
div_survey.InnerHtml = surveytable.ToString();
}
else
{
}
}
private void SendNotificationAll(string userId, string subject, string body, string cc, string bcc)
{
try
{
string approvalEmail;
approvalEmail = EmployeeData.GetEmployeeEmailByUserId(userId);
MailHelper mailHelper = new MailHelper();
Utilities util = new Utilities();
mailHelper.SendMailMessage(util.GetValueFromConfigFile("SupportEmail"), approvalEmail, bcc, cc, subject, body);
}
catch (Exception exp)
{
LogManager logHelper = new LogManager(Request.PhysicalApplicationPath.Trim(), "HR Letter Request");
logHelper.LogError("[SendApproverNotification - ]" + exp.Message);
}
}
private void AlertMessage(string message)
{
string strScript;
strScript = "<script language=javascript>alert('" + message + "');</script>";
Page.RegisterClientScriptBlock("key", strScript);
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
DateTime datetime1, datetime2;
datetime1 = DateTime.Now;
datetime2 = datetime1.AddSeconds(1);
string request_no = Request["requestid"];
var m = Database.GetSurveyId(request_no);
string survey_id = m.survey_id.ToString();
Database.UpdateHRLetterSurveyMasterData(request_no, "2");
Database.RegisterHRLetterSurveyHistory(survey_id, hInitiatorUserId.Value, datetime1.ToString(), "C", datetime2.ToString(), "Survey Completed");
string peoplelinkUserId = GeneralData.GetCountryPeoplelink("1");
Database.RegisterHRLetterHistory(request_no, peoplelinkUserId, datetime1.ToString(), "E", datetime2.ToString(), "Survey Completed");
string messageid;
messageid = GeneralData.InsertMessage(request_no, peoplelinkUserId, "Survey Request[" + request_no + "]", "inbox", "0", "0", "HRLetter", DateTime.Now.ToString(), "1").ToString();
GeneralData.InsertMessageHistory(messageid, "inbox", DateTime.Now.ToString());
Utilities util = new Utilities();
SendNotificationAll(peoplelinkUserId, "Survey Request[" + request_no + "]", "<span style=\"font-family: Arial; font-size:12px\">Dear PeopleLink, <br /><br />Survey Request is completed.<br /><br />Click the link below for more details:<a href='http://" + util.GetValueFromConfigFile("ServerIPAll").ToString() + "/ArabiaHRLetterSurveyForm.aspx?requestid=" + request_no + "&surveyid=" + survey_id + "<br /><br />Thank you<br/>", "", "");
AlertMessage("Survey Request Completed");
Response.Redirect(Page.ResolveUrl("~/HRLetter\\Arabia\\ArabiaHRLetterSurveyForm.aspx?userid=" + hUserIdEncrypted.Value + "&requestid=" + request_no));
}
}
|
|
|
|
|
var tf = $("#newBox" + (i + 1)).is(':checked');
//var edata = "{ 'empno': '" + trid + "','empname': '" + $("#txtUename" + trid).val() + "', 'empadd': '" + $("#txtUeadd" + trid).val() + "','empsal':'" + $("#txtUesal" + trid).val() + "'}";
//{'empno' : '1','empno' : '2','empno' : '3'}
if (tf == true) {
strdel += "'empno" + i + "' : '" + jsonMenuData[i].empno + "'" + ",";
}
|
|
|
|
|
I want to change the content of popup according to the label value after clicking show PopUp Button
(I Means after geeting result from the server )
As the follwing
if (Label value == 0) PopUp value should be ( you must register From the follwing link Register Now)
if (Label value == 1) PopUp value should be (Congratulations You subscriped)
if (Label value == 2) PopUp value should be ( Already subscriped, Thank You)
you can see exactly what i want to do from the follwing link
http://user472.netfx45lab.discountasp.net/testpopup/[^]
And to download the source code from here
http://user472.netfx45lab.discountasp.net/testpopup/TestJquery.rar[^]
Help me Please
Thank you
modified 11-Jun-12 8:07am.
|
|
|
|
|
|
thak you for your help
But i didn't understand how this can solve my problem
problem still exist
Any one can help me ?
|
|
|
|
|
Instead of trying to call the JavaScript function after you get the server results, you should be using AJAX to take care of everything.
|
|
|
|
|
When working in an asp.net App and using Asp.net Report Viewer it works and successfully return data or preview data but it didn't work when request the report page from the server side
|
|
|
|
|
i also faced same problem in my ASP.net application
|
|
|
|
|
i need a full source code for admin panel or cms source code....
actully iam developing an news website i want to update the website regularly...what can i do for update option...and i need a wordpress theme in asp.net with source code..for updation.etc...
if anybody knows means reply me immediately....
|
|
|
|
|
cdinz wrote: i need a full source code
Well you will not get it here. This site is for answering technical questions and helping developers, not for writing programs on demand.
|
|
|
|
|
This is a tiny CMS with fully working admin panel. I hope you will find it useful
YaBlogEngine - A Tiny Blog Engine written in ASP.NET/C#[^]
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
I have a question about a C#.net web form 2010 application where I added new tables to two existing different linq to sql files (.dbml). I dragged these two tables from server explorer on to the 2 .dbml files. When I dragged these tables onto the designer, I was asked if I wanted to use a different data source and I said yes.
Everything works fine as long as I use the web.config file I used when I dragged the two tables onto the designers. However this web.config file is used for production. I want to use the web.config file that should really be used for development/testing. When I use the 'real' test/debug web.config file, the application breaks on a line of code saying I need a new instance of the object. The object that is being referred to is the new tables I dragged onto the designer form. Thus can you tell me what I need to do so I can use the 'test' web.config file?
|
|
|
|
|
Hi,
Can anyone help me to understand just with an example which feature/functionality from ASP.Net MVC will help me acheive following.
1. I am planning to develop this generic search view which will show filtering criteria for different properties of a object passed to it.
2. I want this view to accept dynamically any entity object (edmx generated from my database model which has entities like Employee, Company, Department, EmployeeLeaves, EmployeeSalary,EmployeeTrainings etc this is bsically a HRMS domain project) and then to derive runtime from entity object what properties are available for searching/filtering
3. Also I want to show appropriate operators/options based on data type of properties that is my next hurdle I will try to take care of that.
4. Last but not least show results for specific entity/table based on filtering criteria. (I am guessing I may have to have generic search interface which will be implemented by these entity objects and I call specific implementation of it runtime)
My queries are
1. How can I pass different entity objects (in edmx) since I can only bind one single object as model and not multiple. If there is one base object can I use that as model and pass to it specific object runtime?
2. Also reading properties of objects that gets passed I want to show filtering options so should I be using reflection for that?
If no exmaple or no guidance, do direct me to any article that will help me study this.
Thanks in advance.
Rahul Joshi
|
|
|
|
|
|
This is not a question. This is an ASP.NET forum to ask ASp.NET based technical questions.
If you want to share the link with someone who has asked then use reply/answer around it. Posting it as a question or suggestion in an open forum is meaningless.
|
|
|
|
|
Has anyone used the Izenda or Crystal ad-hoc reporting tools? I'm attempting to see which ad-hoc reporting tool is better and why. I've visited Izenda's blog, and they seem to be very good. Crystal has a nice blog as well. Who's is better and which should I go with? Small company and cost effective.
|
|
|
|
|
I really don't think you should be basing your opinion on which site has the best blog!
Download trials of both and create small apps to test and compare.
I would, however, check the forums to see if there are complaints about responses to issues or reports of bugs which aren't getting attended to.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hi,in vs. 2010 c# web site project I am using web modalanchor for new aspx page. when ı want to close modal web page,I must click twice time page closing (x)button.Why this is happening I cant understand.I am waitinfg for your ideas..
thaks..
|
|
|
|
|