- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
122 Posted Topics
public IList<Labour> Labours { get; set; } public class Labour { public string WorkDates { get; set; } public string WorkHour { get; set; } } I have this code above on my class. How can i add this to my Create View Razor? can anyone tell me please. Also … | |
In form1: Sub loadData() Line of code loading data in gridcontrol End sub In form2: Button 1 Code Dim form1 as new form1 form1.loadData() This code is not working. can anyone help me? | |
I have this jquery code <script type="text/javascript"> $(document).ready(function () { var counter = 2; $("#addButton").click(function () { var newTextBoxDiv = $(document.createElement('div')) .attr("id", 'TextBoxDiv' + counter); newTextBoxDiv.after().html('<input class="required" data-val="true" data-val-regex="Provide a valid date." data-val-regex-pattern="^\d{1,2}\/\d{1,2}\/\d{2}$" name="Date[' + counter + ']" id="Date[' + counter + ']" value="Date[' + counter + ']" style="width:165px" type="text" … ![]() | |
I always getting this error in my dropdownlistfor: Value cannot be null. Parameter name: items View code: @Html.DropDownListFor(model => model.SiteId, new SelectList(ViewBag.ListSiteClass, "SiteId", "SiteName"), "", new { @onchange = "GetSiteid(this.value);" }) Controller Code: [HttpPost] public ActionResult Create(ServiceDTO ms, FormCollection form) { if (ModelState.IsValid) { int sid = ms.SiteId; ServiceDAO.Insert(sid); } … | |
Can anyone help me. My code is not working this is cascading drop down list. It's connected to my database. Jquery Code: <script type="text/javascript"> $(document).ready(function () { $("#SiteId").change(function () { var idDept = $(this).val(); $.getJSON("Service/GetBuildingNameList", { id: idDept }, function (myData) { var select = $("#BuildingID"); select.empty(); $.each(myData, function (index, … ![]() | |
@Html.LabelFor(model => model.ServiceTypeCode)</td> @Html.DropDownList("ServiceTypeId", new SelectList(ViewBag.ListServiceTypeClass, "ServiceTypeId", "ServiceTypeCode", Model.ServiceTypeId), "") can anyone know how to do this. If ServiceTypeCode = 'A1SG43' { @Html.EditorFor(model => model.StatutoryMaintenance) } else { @Html.EditorFor(model => model.CalloutDate) } How to achieve this please. | |
I use DevExpress in some of my projects. Each time there is an update to the devexpress libraries, they get copied to the clients computers when I update the software. Unfortunately this leads to losts of old versions of devexpress libraries on the client’s computers. I'm planning to create a … | |
in form1 i have this code #region MaterialSize Declaration //public static string materialtype = ""; private string _materialtype = ""; private string _size = ""; private string _kg = ""; private string _price = ""; private string _barcolour = ""; private string _sizeLength = ""; private DateTime? _datemodify; #endregion i … | |
Can anyone help me please i get this error on this code dateEdit1.DateTime == frmMaterialPricing.supplydate frmmaterialpricing.supplydate this is the declaration on supplydate = (DateTime)txtSupply.text; When i try to check if datedit1.datetime is equals to supplydate i'm getting error. | |
can anyone help me my sql update is not working. cmd.Parameters.AddWithValue("MaterialSizeId", id); the id on this parameter is already had a value. Maybe the error is on sqltransaction. please help. public void Update(string materialSize, string KgPermetre, string PricePerCut, string MaterialType, string BarColour, string PreferredLength, string datetime) { using (SqlConnection objcon … | |
txtNetPrice.Text = ((Convert.ToDouble(txtLength.Text) * 0) + Convert.ToDouble(txtPriceCut.Text)).ToString(); I'm getting error in this line. please help. | |
Hi can anyone help me on how i can achieve this? I want to have a real time result on two textbox. double a, b, c, result; if (txtPriceMetre.Text == "") { txtPriceMetre.Text = "0"; } else { a = Convert.ToDouble(txtPriceMetre.Text); } if (txtLength.Text == "") { txtLength.Text = "0"; … | |
Hi i've created a class which name is testclass.cls Inside of testclass.cls i created this code public void Insert(string materialSize, string KgPermetre, string PricePerCut, string MaterialType, string LineColour) { SqlConnection objcon = new SqlConnection(Cls_Connection.srConnectionString); objcon.Open(); SqlCommand cmd = new SqlCommand("sp_MaterialSize", objcon) { CommandType = CommandType.StoredProcedure }; cmd.Parameters.AddWithValue("action", "Insert"); cmd.Parameters.AddWithValue("MaterialSizeId", ""); … | |
Re: Are you using STORED PROCEDURE? If you are using then Dim da As New SqlDataAdapter Dim ds As New DataSet Dim dt As New DataTable Dim numberrow As DataRow objCon = New SqlConnection(conStr) <- Just replace this to your connection string. objCon.Open() Dim cmd As New SqlCommand("sp_Customer_Process", objCon) cmd.CommandType = … | |
![]() | Re: @Rahul just Executescalar. For example insert_coupon_query As String = ("INSERT INTO qa_discountcoupons (status_code) VALUES (5); SELECT LAST_INSERT_ID()") Dim cmd_query As New SqlCommand(insert_coupon_query, objConn) Dim cmd_result As Integer = CInt(cmd_query.ExecuteScalar()) textbox1.text = val(cmd_result) + 1 |
![]() | |
Re: Just put this code in your keypress event in your textbox [CODE]Select Case e.KeyChar Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", vbBack e.Handled = False Case Else e.Handled = True End Select[/CODE] if you want to change the input length of textbox just click the properties … | |
i have a problem deleting a data using checkbox please help me here's my code admin.php [CODE]<form id="form1" name="form1" method="post" action="deleteApplication.php"><table border='1' cellspacing='0' width='612'> <tr> <th bgcolor='green'><font color='white'>#</font></th> <th bgcolor='green'><font color='white'>Room No.</font></th> <th bgcolor='green'><font color='white'>Cust. Code</font></th> <th bgcolor='green'><font color='white'>Check In</font></th> <th bgcolor='green'><font color='white'>Check Out</font></th> <th bgcolor='green'><font color='white'>No of Rooms</font></th> <th … | |
Re: here it is cally [CODE]put this code to your load_form rs.open "Select CODE from db_table ORDER BY CODE DESC", cn, 3, 3 textbox1.text = rs!code GetnewID() End Sub Sub GetnewID() if textbox1.text = "" then textbox1.text = "NEW01010" else textbox1.text = "NEW" & Format(Right(textbox1.text, 5) + 1) end if End … | |
can anyone help me on how to done w/ this for example i choose 9/1/2011 i want to get the previous date 8/31/2011. help me please. | |
can anyone help me? i have a problem in converting a 1,000,000.00 number to words i always get result 1 MILLION THOUSAND PESOS ONLY which is wrong. it should be 1 MILLION PESOS ONLY here is my code [CODE]Public Function ConvertMoneyToText(ByVal value As String) As String value = value.Replace(",", "").Replace("$", … | |
can anyone help me how to do it? i have a stored procedure and i want it to pass into excel.. | |
[CODE]cmd.ActiveConnection = cn cmd.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc cmd.CommandText = "sp_login" cmd.Parameters.Append( _ cmd.CreateParameter("result", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamOutput)) cmd.Parameters.Append( _ cmd.CreateParameter("user", ADODB.DataTypeEnum.adVarChar, ADODB.ParameterDirectionEnum.adParamInput, 15, TextBox1.Text)) cmd.Parameters.Append( _ cmd.CreateParameter("passuser", ADODB.DataTypeEnum.adVarChar, ADODB.ParameterDirectionEnum.adParamInput, 15, TextBox2.Text)) rs.Open(cmd, , ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic) If rs.Fields!result.Value = 1 Then AddProduct.Show() Else MsgBox("Your Username or Password is Incorrect", MsgBoxStyle.Information, "AEB Gasul System") Exit … | |
i have a code in stored procedure like this [CODE]if exists (select code from dbo.tbl_product where code = @prodcode) Begin select 'Product Code Already Exist' as msg return End[/CODE] my problem is how can i show this msg in visual basic? | |
how to check if the user input has a match in my given string [CODE] Dim a as string a = "abc" [/CODE] if the user input in the textbox "erty" the message box will be shown string not found. if the user input 123abc the message box will be … | |
hi i manage to export a data coming from listview to excel here is my code [CODE] Try ' Open output file Dim os As New StreamWriter(filename) ' Write Headers For i As Integer = 0 To ListView1.Columns.Count - 1 ' replace quotes with double quotes if necessary os.Write("""" & … | |
[CODE] Private Sub AddIngoing_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load loadprodin() End Sub Private Sub loadprodin() Dim i As Integer objCon = New SqlConnection(conStr) Try objCon.Open() obj = objCon.CreateCommand() str = "Select * from product ORDER BY p_code" obj.CommandText = str sda.SelectCommand = obj sda.Fill(ds, "product") dt … | |
i manage to put a data in listview. i have a problem in searching a data. here is my code: [CODE]Dim sda As New SqlDataAdapter Dim ds As New DataSet Dim dt As New DataTable Dim NumberRow As DataRow objCon = New SqlConnection(conStr) objCon.Open() obj = objCon.CreateCommand() strSQL = "(Select … | |
please help to validate my username i know its simple but i can't get it i want only to validate the first 4 input of the username should be a letter. i try to use the preg_match function but i can't get it correctly. | |
[CODE] ryan = "Select A.*, B.* from training as A, participant as B where B.partname = '" & TextBox1.Text & "' and A.traincode = 'B.traincode'" rs1.CursorLocation = ADODB.CursorLocationEnum.adUseClient rs1.Open(ryan, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) Form11.ListView1.Items.Clear() Dim AddItem As ListViewItem Do While Not rs1.EOF AddItem = New ListViewItem(rs1.Fields!traincode.Value.ToString) AddItem.SubItems.Add(rs1.B.Fields!title.Value) AddItem.SubItems.Add(rs1.Fields!venue.Value) AddItem.SubItems.Add(rs1.Fields!sdate.Value & "-" … | |
Re: did you try this changing this code [CODE] if (!isset($counter)) { $_SESSION['count'] = 0; } else { $counter = $_SESSION['count'] + $_GET['count']; }[/CODE] to this [CODE] if (!isset($counter)) { $_SESSION[$counter] = 0; } else { $counter = $_SESSION[$counter] + $_GET[ $counter]; }[/CODE] | |
i'm planning to put an image before the name of the file. how to do that? for example i have IMAGE1.jpg filename i want to put an JPG image before the filename. | |
Re: look at your code here [CODE]'".$fname."', '".$lname."', '".$age."', '".$email."', '".$phone."', '".$address."', '".$username."', '".$password."', '". $amount."', '".$plan."', '".$benefit."', '".$prem1."', '".$prem2."')");[/CODE] if you already declare this variable for example you use post method in your form $fname = $_POST['fname']; $lname = $_POST['lname']; $age = $_POST['age']; then the rest of the variable your … | |
Re: do you save your image in your database or folder? | |
i have a problem in sharing a file to other user here is my code i get lag when i press the share submit button. share.php [CODE] <form action="sharefile.php" method="post"> <p><strong>Enter Jum/Email ID:</strong></p> <textarea name="share" style="width: 400px; height: 60px;"></textarea> <p>(Jum ID or Primary Email separated by comma)</p> <input type="submit" name="submit" … ![]() | |
i have a problem in uploading multiple file can anyone help me to solve this problem? here is my index.php [CODE]<!DOCTYPE html> <head> <title>MySQL file upload example</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <form action="add_file2.php" method="post" enctype="multipart/form-data"> <input type="file" name="uploaded_file[0]"><br> <input type="file" name="uploaded_file[1]"><br> <input type="file" name="uploaded_file[2]"><br> <input type="submit" value="Upload file"> … | |
Re: in your page change your input checkbox <input type=checkbox name=fruit[] value=$result[fruit_id] id=fruit > $room=$_POST['room']; //look your code here in your page 1 is name=fruit[] it should $room=$_POST['fruit']; $count = count($room); for ($i=0; $i<$count; $i++) { $sql="INSERT INTO reserve (f_aid, f_name, f_pay) VALUES ('$fid', '$fruitname', '10')"; if (!mysql_query($sql,$conn)) { die('Error: ' … | |
Re: create userid to your file table to make a unique file to the user. also i suggest to you, do not put your file in your dbase it will get bigger and hard to load someday/somehow, create a folder to upload all of your files there. delete this code and … | |
Re: $email = mysql_fetch_array($result); $email1 = $email['emai']; session_register("$email1"); | |
| |
hi i manage to upload 1 file and save it to the server. how can i add more button to upload a file and save it to mysql? i want is after the user upload a file theres another a button to upload again another a file how can i … | |
i have a problem generating auto number. can someone help me to solve this? here is my code [CODE] Try If IsConnected() = True Then strSQL = "Select max(*) from Supplier" End If myCmd.CommandText = strSQL myCmd.Connection = myConn myDA.SelectCommand = myCmd myDR = myCmd.ExecuteReader() If myDR.HasRows Then Label5.Text = … | |
i have a problem generating auto number. can someone help me to solve this? here is my code [CODE]Try If IsConnected() = True Then strSQL = "Select max(*) from Supplier" End If myCmd.CommandText = strSQL myCmd.Connection = myConn myDA.SelectCommand = myCmd myDR = myCmd.ExecuteReader() If myDR.HasRows Then Label5.Text = myDR.Item(0) … | |
i have a problem in connecting in access 2003 here is my code Module Module1 Public cn As New ADODB.Connection Public rs As New ADODB.Recordset Public Sub connection() cn.Open("[B]Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Project Management\pm.mdb;Persist Security Info=false[/B];") cn.Open() End Sub Public Sub OpenRecordset(ByVal sRecordset As ADODB.Recordset, ByVal sString As String) sRecordset.CursorLocation = ADODB.CursorLocationEnum.adUseClient sRecordset.Open(sString, … | |
Re: you must connect your library first before you use it, dim cn as new adodb.connection Set cn = New ADODB.connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\myDatabase.mdb;Persist Security Info=False;Jet OLEDB:Database Password=smiojt" | |
Re: i think its easier to use that in vb.net. | |
[CODE]If Option1.Value = True Then a = 3 End If If Option2.Value = True Then a = 2 End If If Option1.Value = True Then a = 1 End If If Option4.Value = True Then b = 3 ElseIf Option5.Value = True Then b = 2 Else b = 1 … | |
Re: drphil, don't set a primary key to your table. try it and i'm sure it will work well. | |
here's my code [CODE] $sql=mysql_query("insert into guest (fname, lname, address, contactno, emailadd) values ('$fname', '$lname', '$country', '$contact', '$mail')"); $search = mysql_query("select * from guest order by code DESC limit 1"); $row = mysql_fetch_array($search); $lastnum = $row['code']; $number = $_POST["Rooms"]; $count = count($number); for ($i=0; $i<$count; $i++) { mysql_query("Insert Into rent … |
The End.