Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by rhishi20

  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.
  15. Dear friends, I am running with a strange problem of visual studio 2010. I have one of the already developed web application with asp.net and now I need to modify or add new modules in it. so I open same project and found design page error called as "Error Hresult E_fail has been returned from call to com component" in visual studio 2010. also I search it on internet and found solution like 1) delete temporary files for web application 2) Install fresh copy of visual studio or Repair visual studio and many more but none of the option has worked for me guys please help me to resolve this error thanks in advance
  16. Dear All, I am working on project in asp.net and vb.net as code behind. The project needs to take a data from database and based on that data, I want to build orgchart(organization chart). so I decided to use third party control called as basic primitives. they have shown Jquery version of orgchart on their website. also they have provided primitive.js file which holds all the jquery classes which are required to build orgchart. but my problem is how to pass my data from database to these jquery classes for building orgchart note: I am using visual studio 2010 .
  17. I have a Textbox which accepts Date. I have use maskeditextender and maskeditvalidator from ajax. following is the code: <asp:MaskedEditExtender ID="MaskedEditExtender1" TargetControlID="txtBdate" CultureName="en-GB" MaskType="Date" Mask="99/LLL/9999" OnInvalidCssClass="error1" UserDateFormat="DayMonthYear" runat="server"> </asp:MaskedEditExtender> <asp:MaskedEditValidator ID="MaskedEditValidator1" ControlToValidate="txtBdate" ControlExtender="MaskedEditExtender1" InvalidValueMessage="wrong date" TooltipMessage="Please Enter Date in DD/MMM/YYYY Format" ValidationExpression="^(0?[1-9]|[12][0-9]|3[01])-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(19|20)dd$" runat="server"></asp:MaskedEditValidator> I want to write date in dd/MMM/yyyy (12/Aug/1988) this format. you can see that, i have use regular expression for validating dd/MMM/yyyy format. but textbox is not accepting date in dd/MMM/yyyy format. i have also tried to change culture from en-us to en-Gb in web.config but not getting success. please tell me how to solve this problem.
  18. I want know what data will go to the server, when I click on save button of asp page without using update panel and using update panel .
  19. I am using Ajax File Upload control for uploading multiple files at same time. but i want use my own upload button (in my case save button) for uploading files not the ajax upload button. how can i do this ?
  20. I have designed a website in asp.net & make compatible with 1024*768 resolution by using css media queries. following css media query i have used @media only screenand (min-width : 1000px) and (max-width:1024px){#div1{ width:1012px; height:460px; }#GridView2{ width:1012px; height:460px; } } at first, i have tested my website on IE8 on my own monitor screen (19 inch monitor), everything works fine for me but when i have tested same website on littile bigger screen (21 inch monitor) with 1024*768 resolution & IE8 browser, gridview felt shorter in height when i run website. i don't understand why this is happening though i have run website both times on same resolution (1024*768) but different size of screen. suggest any solution to tackle this problem.
  21. Guys, i have resolve my basic problem in some extent. my basic need is my website must work on different monitor sizes and on different resolutions. i have came to know that, i can use css media queries for setting different css style to different resolutions. following is the media query for 1024*768 resolution @media only screenand (min-width : 1000px) and (max-width:1024px){#div1{ width:1012px; height:460px; }#GridView2{ width:1012px; height:460px; } } you can see that i have set width and height for gridview but again i have stuck on how to set different cell width for each cell in gridview by using css. please help if any idea
  22. To Justsomeguy & davej In my case <div> is working like container for gridview. and responsible for setting height of gridview. my problem is on different monitor sizes gridview height and width are non-consitent. hence i think that i can use windows.innerheight and windows.innerwidth in javascript. so i have define a javascript function which calculates windows.innerheight and windows.innerwidth and thinks that instead of setting height from div we can call this javascript function for setting div's height and hence ultimately gridview's height. but how to call this function from <div> beacause there is no onload event. i have also tried by your way like below <div> <gridview> content </gridview> </div> <script type="text/javascript"> felxibleht(); </script> following is my javascript function function felxibleht() { debugger; var newht; var newwt; newht = window.innerheight; document.getelementbyid("GridView2").style.height = newht; newwt = window.innerwidth; document.getelementbyid("gridview2").style.width = newwt; } but does't work. please suggest any mistake i have commited.
  23. I am working on asp.net project. i have a gridview which looks consistant on my monitor screen.but when my website's run on different shapes of monitor screen, alignment of gridview disturbes completely. following is my structure of gridview <div class="CSSTableGenerator" id="div1" style=" overflow:scroll ; height:450px" > <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%; height:698px" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Both" > </asp:gridview> </div> here actually div is responsible for setting height of gridview. now i want to make my gridview flexible in size with any other monitor sizes. and hence i have decided to use window.innerheight and window.innerwidth in javascript but now major problem is how do i call javascript function onload of div. because div don't have onload event. please suggest solution .
  24. I am using tab container from ajax toolkit for asp.net. i want to set background color for tabpanel's header area. how i can do it ?
  • Create New...