|
Hi all,
I am using ASP.NET 2.0.I have a gridview which has 5-6 columns and two template columns, one containing a dropdownlist and other containing a textbox.The grid also contains three columns viz Itemcode, BatchNo and LOtNo, all three combine to form the primary key of the table.Now on a button click which is outside the grid ,i need to check that the Sum of all the distinct items irrespective of batch, lot be same
Actually I have two problems:
1.I used the following code for looping through the grid:
$('#Item_Details tr').each(function() {
if (!this.rowIndex) return;
var packsize = $(this).find("td").eq(3).html();
var ddl_id=$(this).find(':input[type=select]').attr('id');
var textid_id=$(this).find(':input[type=text]').attr('id');
here i am able to get the textbox id but ddl id always returns undefined !!!!
2. Whats the best method with which i can group the items and find the sum using jQuery???
Any help would be appreciated....
When you fail to plan, you are planning to fail.
|
|
|
|
|
var ddl_id = $(this).find(':input[type=select]').attr('id');
You used an error selector.
Ex:
var ddl_id = $(this).find('select').attr('id');
|
|
|
|
|
Can anyone help me to develop an application similar to statsremote so that my website's members can easily gather their stat from numerous affiliate program easily.
Any reference link, source, guide or tips will be appreciable.
Thank you
|
|
|
|
|
in database there is radiobuttonvalue stored.
when form is loaded at that time it should check whether the database value is radiobutton value. if it is ,then it should show the radiobutton checked
at form load.
|
|
|
|
|
That's nice. Is there a question you'd like to ask?
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: That's nice. Is there a question you'd like to ask?
lol
|
|
|
|
|
|
i m working on asp and i m fresher .
i want to know how to design home page using
menus and submenus i will go on that page.
when i click on submenu login then i should go to login.asp page.
with attractive home page i have to make.plz help me .
i can use only javascript or asp or css.
|
|
|
|
|
|
|
Hello
I found this page: http://msdn.microsoft.com/es-es/library/8728chd5.aspx
I want to get the user name and the password in the web service but I can not.
Anyone knows how can I do it? These are my files:
***********************************************************************
***********************************************************************
MyWebService.asmx.vb
***********************************************************************
***********************************************************************
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
' Define a SOAP header by deriving from the SoapHeader base class.
Public Class MyHeader : Inherits SoapHeader
Public Username As String
Public Password As String
End Class
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class MyWebService
' Add a member variable of the type deriving from SoapHeader.
Public myHeaderMemberVariable As MyHeader
' Apply a SoapHeader attribute.
<WebMethod(), SoapHeader("myHeaderMemberVariable")> _
Public Function MyWebMethod() As String
' Process the SoapHeader.
Return myHeaderMemberVariable.Username
End Function
End Class
***********************************************************************
***********************************************************************
test1.php
***********************************************************************
***********************************************************************
<?php
require_once('nusoap_0-7-3/lib/nusoap.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Probando los Web Services desde PHP</title>
</head>
<body>
<?php
$wsdl = 'http://localhost/ws/MyWebService.asmx?WSDL';
$method = 'MyWebMethod';
$params = array();
$client = new nusoap_client($wsdl, 'wsdl');
//$client->response_timeout = 600;
$client->soap_defencoding = 'UTF-8';
$client -> setHeaders('
<MyHeader>
<Username>myUserName</Username>
<Password>myPassword</Password>
</MyHeader>
');
$err = $client->getError();
//echo "<br/> proxyport =".htmlspecialchars($client->$proxyhost)."<br/>";
if ($err) {
echo '<h2>Error del contructor</h2><pre>' . $err . '</pre>';
echo '<h2>Debug:</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit();
}
$result = $client->call($method, $params);
if ($client->fault) {
echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
?>
</body>
</html>
***********************************************************************
***********************************************************************
The error:
***********************************************************************
***********************************************************************
Fault
Array
(
[faultcode] => soap:Server
[faultstring] => System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at meals_ws_application.MyWebService.MyWebMethod() in C:\Documents and Settings\ingenieria\Mis documentos\Visual Studio 10\Projects\ws\meals-ws-application\MyWebService.asmx.vb:line 25
--- End of inner exception stack trace ---
[detail] =>
)
Request
POST /ws/MyWebService.asmx HTTP/1.0
Host: localhost
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://tempuri.org/MyWebMethod"
Content-Length: 554
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4181="http://tempuri.org"><SOAP-ENV:Header>
<MyHeader>
<Username>Admin</Username>
<Password>contrasenia</Password>
</MyHeader>
</SOAP-ENV:Header><SOAP-ENV:Body><MyWebMethod xmlns="http://tempuri.org/"></MyWebMethod></SOAP-ENV:Body></SOAP-ENV:Envelope>
Thanks for your help.
|
|
|
|
|
Hi every one
I used an image control on a web page.The image is shown in design time but not in runtime.The ImageUrl is "~/Images/bg.jpg".
I tried other formats like "./Images/bg.jpg" or "F:/myWebSite/Images/bg.jpg" but no success.
any idea?
thanks
|
|
|
|
|
Does your image folder contain web.config file?
|
|
|
|
|
No , there is no config file in "Images" folder.
|
|
|
|
|
Can you access the images by URL in a browser?
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Yes ,I can access the image by url "f:\WebSite2\Images\bg.jpg " in browser.
|
|
|
|
|
Hello,
I need to know this one. How can we get printer status using JavaScript and also how can we give MS word document print command using JavaScript.
Thank you,
Gokul Rangarajan
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/aa394363%28v=VS.85%29.aspx[^]
Refer this one
Sample code is
string printerName ="HP LaserJet M1522 MFP Series PCL 6 (Copy 1)"; // this is my printer name
memoPrintDetail.Clear(); //memoPrintDetail is richTextBox to show my complete printer status later on
memoPrintDetail.AppendText("Printer Name : " + printerName + "\n");
ManagementScope scope = new ManagementScope(@"\root\cimv2");
scope.Connect();
// Select All Printers from my computer
ManagementObjectSearcher searcher = new
ManagementObjectSearcher("SELECT * FROM Win32_Printer");
ManagementObjectCollection collection = searcher.Get();
string filename="text1.txt";
File.WriteAllText(filename,"");
//File.Create("text1.txt");
foreach (ManagementObject printer in collection)
{
//if (printer["Default"].ToString().ToLower().Equals("true"))
//{
// printerName = printer["Name"].ToString();
//}
//else
//{
// continue;
//}
if (printer["Name"].ToString() == printerName)
{
if (printer["WorkOffline"].ToString().ToLower().Equals("true")) // This code is working
{
memoPrintDetail.AppendText("Status : Offline\n");// This code is working
return;
}
else
{
memoPrintDetail.AppendText("Status : Online\n");// This code is working
}
//MessageBox.Show(printer["ExtendedDetectedErrorState"].ToString()); // Always show "0" value
// MessageBox.Show(printer["DetectedErrorState"].ToString()); // Always show "0" value
foreach (PropertyData pdata in printer.Properties)
{
File.AppendAllText(filename, "\r\nName: " + pdata.Name);
File.AppendAllText(filename, "\r\nValue: " + pdata.Value);
memoPrintDetail.AppendText("\nName" + pdata.Name);
memoPrintDetail.AppendText("\nValue" + pdata.Value);
}
}
}
Note::
----------
memoPrintDetail is a rich textbox
suriya
|
|
|
|
|
Hello,
This is Gokul Rangarajan. I need a suggestion or code in JavaScript which reads the MS Word document page settings and number of pages. I know how to open and read a MS Word document, but i couldn't able to get page properties. Some one please help me with this.
Thank you,
Gokul Rangarajan
|
|
|
|
|
Hello,
It Gokul again. I found the solution for my problem i've posted
var w=new ActiveXObject('Word.Application'); --creare MS word obj.
w.Documents.Open("C:\\ABSTRACT.doc"); -- open a doc..
obj=w.visible=false; --- set visible false
obj.Content; --- to get content in MS word doc..
w.ActiveDocument.ComputeStatistics(2); -- Get number of pages
w.ActiveDocument.ActiveWindow.Panes(1).Pages.Item(1).Width; -get width in pixels..
w.ActiveDocument.ActiveWindow.Panes(1).Pages.Item(1).Height; -get height in pixels..
w.ActiveDocument.PageSetup.TopMargin --get Margin top in pixels
w.ActiveDocument.PageSetup.LeftMargin --get Margin left in pixels
w.ActiveDocument.PageSetup.BottomMargin --get Margin bottom in pixels
w.ActiveDocument.PageSetup.RightMargin --get Margin right in pixels
w.ActiveDocument.PrintOut(); //Print given document
Note: 72 pixel = 1 inches.
Thank you,
Gokul Rangarajan
|
|
|
|
|
Dear friend,
I have hosted 3 web sites (WebSite1, WebSite2 ,WebSite3) on IIS6.0.
I want to kill process of website2 in c# while killing the process of Web Site 2 ,the other website like website1 and website3 should not be stopped .First of all I am very eager to know how to get process of specific website so that I can kill process individually.WebSite1 , WebSite2 and Website 3 is not in default website . These are created separately.
Please let me know how to kill process of specific website.
Regards
Rajesh
rajesh
|
|
|
|
|
Hi,
do you host every website in a different application pool? If yes, then you can kill a website by killing the process for the app-pool. I know there is a command-line tool to get the name of the process running a single application pool, so I guess this is also possible using WMI or something similar.
Regards
Sebastian
|
|
|
|
|
Hi
i am using vb script in my client side and i have to send a byte array from this client side to server side(may be iis).
at present i am just converting this byte array into string and send thro hidden field.
but i need to send the byte array directly(without any conversion).
hope i'll get quick reply.
thanks
regards
subramanian
|
|
|
|
|
I want to disable print screen on the webpage.
I have tried the option of Clearing the Clipboard after regular interval, issue with this is, it also clears the text data from clipboard
I want to disable only the print screen, whereas user can copy/paste the text data from other windows
|
|
|
|
|
I am writing a winform application that allows the user to define a range in a HTML document by selecting two anchor points: beginning and end. I'd like to graphically display the selected range by programattically inserting HTML into the in-memory version of the HTML, which should then render in my WebBrowser control. Ideally, I'd like to draw a box around the selected range, maybe with a nice colored background. Unfortunately, the beginning and ending anchor points may not reside in the same HTML block, and I'm not sure how to write the HTML to make a box span HTML blocks like that.
Clear as mud? Any thoughts or ideas would be appreciated.
Aaron
|
|
|
|