Jump to content


  • Posts

  • Joined

  • Last visited

About rhishi20

  • Birthday 12/25/1988

Profile Information

  • Location

rhishi20's Achievements


Newbie (1/7)



  1. Hi Guys, i am facing a problem in updating precomplied website. i have a precompiled website on server. i have taken copy of that website on my local machine and done some changes in sql query which fetches some data. this query is under App_code folder. and then i have copied everything and overwrites existing folders of this website on server (including App_code folder) . but when i run website, it gives me error on App_code folder (error:this is precomplied website) . and that's why i have removed App_code folder from server. and then website works fine but whatever i have changed in new query doesn't get reflected. now i want to do those changes but i am not able to. please guide me. Regards, Rhishikesh
  2. To JustSoemGuy: I have solved it by another way but not by using webservice, i have used postback of one of the dropdown to finish the work at server side. and then call javascript function on Button Click. thanks for the help.
  3. I have placed script debugger before a.EnqPreExistOrNot(paraCcn, paraPcode, OnSucessorFail); in javascript function and dubugged it through developer console it give me error: Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:1188/dataPreExist.asmx/jsdebug
  4. I have placed debugger in webservice but while debugging, debugger not going inside webservice. is there any other method of debugging webservice(asmx webservice) if possible, please suggest ? even if i place script debugger inside function OnSucessorFail() which is a javascript function it is not going inside that function. before calling below mentioned webservice, all javascript code above this webservice call works fine, but webservice call is not working for me and also javascript after it. a.EnqPreExistOrNot(paraCcn, paraPcode, OnSucessorFail); is this webservice call is right ? you can see i have placed confim box in javascript which has to come after successful execution of mentioned webservice which is not happening in my case.
  5. Dear friends, Basic need -------------- I need to call asmx webservice from javascript function. onbuttonclick, i am actually calling that javascript function. line with high size font is the problem area. please help guys working from past 5 days on this part WebService Registration with aspx page--------------------------------------------------- <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true"> <Services> <asp:ServiceReference Path="~/dataPreExist.asmx"/> </Services> </asp:ToolkitScriptManager> WEBSERVICE ------------------ <ToolboxItem(False)> _ Public Class dataPreExist Inherits System.Web.Services.WebService <WebMethod()> _ Public Function EnqPreExistOrNot(ByVal paraCcn As String, ByVal paraPcode As String) As Boolean Dim strsql6 As New StringBuilder Dim localdt6 As New DataTable ' ccn = "DJ079" ' party = "04BSPT0066" With strsql6 .Append("select * from complaintmastercrm where ccncd='" & paraCcn & "' and partycd='" & paraPcode & "'") End With localdt6 = CommonDb.ReturnDataTable(strsql6.ToString, "CRM") If localdt6.Rows.Count > 0 Then EnqPreExistOrNot = True MsgBox("pre Enquiry Exist") MsgBox("Pre Enquiry not exist") Else EnqPreExistOrNot = False End If End Function End Class End Namespace Javascript Function ------------------------- function webServiceCall() { var paraCcn; //var paraPartyCd; var paraPcode; //alert('hello last') paraCcn = document.getElementById("<%=lblCcn.clientID%>").innerHTML; paraPcode = document.getElementById("<%=hdnParty.clientID%>").value; paraPcode = paraPcode.replace(/,s*$/, ""); var a = new namespace1.dataPreExist(); //not working block a.EnqPreExistOrNot(paraCcn, paraPcode, OnSucessorFail); //not working block } function OnSucessorFail() { debugger; var proceed; proceed = confirm("Enquiry already Generated for this Machine and Cost Center"); if (proceed == true) { return true; } else { return false; } }
  6. I have solved the problem, just by removing space between <WebMethod(Description:="Method for checking ENQ PreExist or not")> _ and Public Function EnqPreExistOrNot() As Boolean
  7. I am trying to develop asp.net webservice, but it gives Error:Attribute specifier is not a complete statement use a line continuation to apply the attribute to following sttatement.> coloured wth RED is the place where i am getting error following is my code block --------------------------------- <WebMethod(Description:="Method for checking ENQ PreExist or not")> _ Public Function EnqPreExistOrNot() As Boolean Dim strsql6 As New StringBuilder Dim localdt6 As New DataTable With strsql6 .Append("select * from complaintmastercrm where ccncd='" & lblCcn.Text & "' and partycd='" & ViewState("partycode") & "'") End With localdt6 = CommonDb.ReturnDataTable(strsql6.ToString, "CRM") If localdt6.Rows.Count > 0 Then EnqPreExistOrNot = True Else EnqPreExistOrNot = False End If End Function
  8. I am trying to assign data to dropdownlist in asp.net from textbox Textchanged event but dropdownlist not showing any data . actually i am trying to connect with database asynchronously so that i must able to see suggestions just like google instant related with whatever i am enetering in textbox but i can't get it. any help will be appreciated. vb.net code ---------------- Protected Sub tXtCustomer_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tXtCustomer.TextChanged Dim strsql4 As New StringBuilder Dim localdt4 As New DataTable With strsql4 .Append("select mc.ccncd,mp.partycd from mccn mc inner join mparty mp on mc.PartyCd=mp.partycd where mp.PartyCd like '" & tXtCustomer.Text & "%' ") End With localdt4 = CommonDb.ReturnDataTable(strsql4.ToString, "ERP") If localdt4.Rows.Count > 0 Then drpCcnTrial.DataSource = localdt4 drpCcnTrial.DataBind() drpCcnTrial.DataTextField = "ccncd" drpCcnTrial.DataValueField = "ccncd" drpCcnTrial.Items.Insert(0, New ListItem("Select CCN from List", 0)) End If End Sub asp.net code ----------------- <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Always" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="txtCustomer" EventName="TextChanged" /> </Triggers> <ContentTemplate> <asp:TextBox ID="tXtCustomer" runat="server" autopostback="true" ></asp:TextBox> <asp:DropDownList ID="drpCustomer" runat="server"> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel>
  9. I am not understanding why there are quotes ' ' after column name and function of xml path.
  10. Dear Friends , I am just going through SQL Stored Procedure which is previously created. it contains mail Generation in HTML through SQL. in following code i am not able to understand use of number (1) & (2) please explain me. ----------------------------------------------------------------------------------------------------------------------SET @tableHTML = N'<H>MRP Indent Details</H>' + N'<table border="1">' + N'<tr><th>Indent Code</th><th>Indent Date</th><th>indent Type</th>' + N'<th>Approved BY</th><th>Cost center</th><th>No Of Items</th><th>Approximate Rate</th></tr>'+ CAST ((select td=a.Indentcd,' ', (1) ' ' td=a.IndentDt,'', td=a.indenttype,' ', td=a.ApprovedBy,' ', td=a.ccncd,' ', "td/@align" = 'right',td=a.Itemcnt,' ', "td/@align" = 'right',td=a.mthwtavgrate,' ' from TmpMRPMail a FOR XML PATH('tr'), TYPE ) AS NVARCHAR(MAX)) + N'</table>' ; (2) XML Path -----------------------------------------------------------------------------------------------------------------------
  11. I have Two gridviews on single ASPX page. after clicking linkbutton on 1st gridview second grid will display. and on that grid, I have another linkbutton which will open a new window using javascript. my problem is, after opening new window my aspx page does postback which I don't want. so I decided to use return false in javascript function Javascript Function ------------------------- function show_windowResCAdetails(deptname) { var url1; var complaintno = document.getElementById("HiddenField2").value; url1 = "viewResCallActionDetails.aspx?deptname=" + deptname +"&complaintno=" +complaintno vWincal1 = window.open(url1, "Responsible_CallActions", "width=730,height=350,status=no,resizable=yes,top=230,left=175,scrollbars=1"); return false; } Design Page(Template inside Gridview) -------------------------------------------------- <asp:TemplateField HeaderText="Dept Name"> <ItemTemplate> <asp:LinkButton ID="lnkResDept" Text='<%#bind("deptnm")%>' OnClick="lnkResdept_Click" OnClientClick='<%#"show_windowResCAdetails(""" + Eval("deptnm") + """);return false;"%>' runat="server"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> here you can see that I have used return false two times in javascript function as well as on inline design. when i have tried to remove any of the return false; then aspx page will remain doing postback. but when i use both my problem solves. i don't understand how it is working. regards, Rhishikesh
  12. case1 -------- Protected Sub lnkResdept_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim resdept As String resdept = sender.text End Sub case2 -------- Protected Sub lnkResdept_Click(ByVal sender As Object, ByVal e As System.EventArgs) resdept= CType(sender, LinkButton).Text end sub I am not able to understand difference between these two cases, case1 produces the linkbutton's value for example C1500017 and case2 also produces same result. I am not able to understand why explicit type casting is done in case2. thanks, Rhishikesh
  13. Thanks ! this solves the problem
  14. I am working with vb.net and want to upload file. i am using stringbuilder for building sql query. but not able to properly concatenate following sql statement in vb.net. path = ConfigurationManager.AppSettings.Get("resDeptCommentPath") .Append("actionDescFileName='" & fuActDescFile.FileName & "',actionfilepath='" & path & " " & '" & ViewState("DepartmentName") &"' & "ActionDescription" "',") & represented with green color is the error spot and it gives expresssion expected error. I guess, i am not concatenating things properly. help will be appreciated. note:don't consider .append for second line i have written this code in single line while coding.
  • Create New...