15,949,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Ram7 from Hyderabad (Top 43 by date)
Ram7 from Hyderabad
8-Jul-13 8:17am
View
Hi Thanku again,nw its working fine..............
Ram7 from Hyderabad
8-Jul-13 7:21am
View
Hi Shanu,
Thanks for ur quick responce,ya i checked once again, whatever the ID i need is getting showing in obj,iam finding the error at db.savechanges()line of my code,
Thanks
Ramu
Ram7 from Hyderabad
6-Jun-13 6:22am
View
Dear Ebrahimi,
Thanks a lot for ur responce, i will go with ur links....
Ram7 from Hyderabad
3-Jun-13 1:56am
View
I have tried with ur suggestions,but iam unable to get the cellvalue,just iam getting the null value,please try to find out where iam doing the mistake or try to guide me for any alternative to meet my requirement..
Thanks
Ramu
Ram7 from Hyderabad
3-Jun-13 1:38am
View
Yes i need EmployeeID columns value to the EDIT Action method
Ram7 from Hyderabad
3-Jun-13 1:35am
View
This is the Question which i have updated now:-
"How to get an rows cell value from JQGrid to Controller Action method"
Thanks
Ramu
Ram7 from Hyderabad
3-Jun-13 1:19am
View
Hi,i have posted as new thread,please help me.......
Ram7 from Hyderabad
31-May-13 7:13am
View
Dear Jameel,
Thanks for ur responce,the code u provided is working fine for my 1st requirement i.e displaying Edit Links to each row, but iam facing problem with getting an Id to the Controller Action.This is how i modified my JQGrid with ur code
$("#emp-data-grid").jqGrid({
datatype: "local",
data: mdata,
colNames: ["EmployeeID", "EmpName", "Designation", "Salary", "MobileNo", "Email", ""],
colModel: [
{ name: "EmployeeID", index: "EmployeeID", sortable: false,
editable: true, edittype: 'checkbox', editoptions: { value: 'true:false' }
},
{ name: "EmpName", index: "EmpName" },
{ name: "Designation", index: "Designation" },
{ name: "Salary", index: "Salary", sorttype: "int" },
{ name: "MobileNo", index: "MobileNo", sorttype: "int" },
{ name: "Email", index: "Email" },
{name: 'Link', formatter: function (cellvalue, options, rowObject) {
var x = '@Html.ActionLink("EDIT", "Edit", "Home", new { id = "EmployeeID" }, new { @style = "color:Blue;font-weight:bold;" })';
return x.replace("EmployeeID", rowObject[1]);
}, align: 'left', width: 100
}
shrinkToFit: true,
viewrecords: true,
sortorder: 'asc',
caption: "Employee List"
});
this is my Controller Action code:-
public ActionResult Edit(int id)
{
ViewData["RowData"] = int id;
return view();
}
In the above controller i want to access id and send to view for displaying that id in some textbox,using viewdata.
Please guide me where iam doing mistake,...
Thanks
Ramu
Ram7 from Hyderabad
14-May-13 3:19am
View
Can you please explain in detail how to fix the formatting,as iam new to MVC
Ram7 from Hyderabad
10-May-13 5:17am
View
Hi,Following is my Controller Code
public ActionResult GetData(TableData model)
{
using (personalEntities db = new personalEntities())
{
var emply = from p in db.empdetails
select new
{
EmpID = p.empid,
EmpName = p.ename,
Designation = p.designation,
Salary = p.salary,
DeptNo = p.deptno,
};
}
return View(emply.ToList());
}
In the Last line of my Controller Code i.e return View(emply.ToList()),please observer this line wheather iam doing write or not..
Thanks
Ramu
Ram7 from Hyderabad
2-May-13 0:53am
View
Dear Moideen,
The code u provided is working fine for redirecting from one controller,but here i have one more requirement i.e is there any possibility for redirecting from one view to another view with some data...
Ram7 from Hyderabad
2-May-13 0:37am
View
Dear Moideen,Thanks for ur intrest towards my post,here is my controller code
public ActionResult Login(UsersLogin model)
{
if (model.UserName == "employee1" && model.Password == "ramu")
{
//return View("~/Views/Account/Register");
return View("employee1");
}
else if (model.UserName == "employee2" && model.Password == "ramu2")
{
return View("employee2");
}
else if (model.UserName == "manager" && model.Password == "manager")
{
return View("manager");
}
else if (model.UserName == "admin" && model.Password == "admin")
{
return View("admin");
}
else
{
ViewData["Error"] = "Invalid UserId or Password";
return View();
}
}
I Have created 5 views
1)Normal Login View:-
Member Login
type="text/javascript"></script>
@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
@using (Html.BeginForm()) {
<div>
<fieldset>
@* Account Information
*@
<div class="editor-label">
@Html.LabelFor(m => m.UserName)
</div>
<div class="editor-field">
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
</div>
<div class="editor-label">
@Html.LabelFor(m => m.Password)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.Password)
@Html.ValidationMessageFor(m => m.Password)
</div>
@*<div class="editor-label">
@Html.CheckBoxFor(m => m.RememberMe)
@Html.Label(ViewData["Error"])
</div>*@
<div>
@ViewData["Error"]
</div>
<p>
<input type="submit" value="Log On" />
</p>
</fieldset>
</div>
}
2)employee1 View:-
<table>
<tr>
<th></th>
<th>Empid</th>
<th>Ename</th>
<th>Task</th>
</tr>
<tr>
<td>@Html.ActionLink("Edit","Edit")
</td>
<td>101</td>
<td>Ramu</td>
<td>Fixing Bugs</td>
</tr>
</table>
3)Similarly employee2 view:-
You are Logged in as employee2
<table>
<tr>
<th></th>
<th>Empid</th>
<th>Ename</th>
<th>Task</th>
</tr>
<tr>
<td>@Html.ActionLink("Edit","Edit")</td>
<td>102</td>
<td>Vijay</td>
<td>Testing Code</td>
</tr>
</table>
4)Manager view:-
You are Logged in as Manager
<table>
<tr>
<th></th>
<th>Empid</th>
<th>Ename</th>
<th>Task</th>
</tr>
<tr>
<td>@Html.ActionLink("Edit","Edit")
<td>101</td>
<td>Ramu</td>
<td>Fixing Bugs</td>
</tr>
<tr>
<td>102</td>
<td>Vijay</td>
<td>Testing Code</td>
</tr>
</table>
5)Admin view:-
<table>
<tr>
<th.</th>
<th>Employees</th>
<th>ManagerName</th>
<th>ManagerTask</th>
</tr>
<tr>
<td>@Html.ActionLink("Edit","Edit")
<td>Ramu</td>
<td>RamaKrishna</td>
<td>Code Review</td>
</tr>
<tr>
<td>Vijay</td>
<td>Naresh</td>
<td>Code Review</td>
</tr>
</table>
Hear i need to create one
Ram7 from Hyderabad
29-Apr-13 7:45am
View
Dear Prabakar,
Thanks for ur responce the links u provided to me helped me a lot and cleared all confusions about how to implement the validations in MVC......
Ram7 from Hyderabad
26-Apr-13 6:19am
View
Dear Vijay,thanks for ur responce my requirement is with checkbox only,i will try with ur code,thanks once again for ur responce......
Ram7 from Hyderabad
13-Mar-13 4:07am
View
Dear Bernhard,myn actual requirement is i need to copy a table data from my local mysql db to a table present in different server mysql db,for example if i have a two tables say mainlog and sparelog, mainlog table is present in local mysql db& sparelog table is present in different server mysql db, now if i perfor any dml operation it should auto reflect to sparelog table by writing some triggers or stored procedures
Ram7 from Hyderabad
13-Mar-13 3:57am
View
Hii,it is two different database's,
Ram7 from Hyderabad
13-Mar-13 3:29am
View
Hii,ya i have tried from MSSQL to MYSQL by creating linked server to mysql,even i have another requirement that is it possible to connect from MYSQL to MSSQL,if yes please guide how should i go with this..........
Ram7 from Hyderabad
12-Mar-13 5:20am
View
Thank u i will go with the above link
Ram7 from Hyderabad
12-Mar-13 5:10am
View
Hii thanks for ur responce,will u guide me how to work with ssis,provide some documentation links.
Thanks
Ramu
Ram7 from Hyderabad
1-Mar-13 5:01am
View
Dear gvprabhu, thanks a lot its working....................
Ram7 from Hyderabad
28-Feb-13 5:55am
View
Dear kumar,sorry for disturbing u again, iam finding again errors with update please help me,this is the trigger iam writing for update
create TRIGGER updateLogRecords
ON mainlog FOR update
AS
BEGIN
update users2.dbo.sparelog set users2.dbo.sparelog.empid in(inserted.empid WHERE users2.dbo.sparelog.empid =Inserted.empid)
END
thanks
Ramu
Ram7 from Hyderabad
28-Feb-13 5:43am
View
ya sure definitely
Ram7 from Hyderabad
28-Feb-13 5:16am
View
Ya kumar,its working thanks for all,
Ram7 from Hyderabad
28-Feb-13 5:05am
View
Both tables mainlog&sparelog have similar structure with same datatypes,like this with 5columns
empid Firstname Lastname Location Age
and update trigger like what u have given:-
CREATE TRIGGER UpdateLogRecords
ON mainlog FOR UPDATE
AS
BEGIN
UPDATE users2.dbo.sparelog SET users2.dbo.sparelog.Age=Inserted.Age WHERE users2.dbo.sparelog.empid=Inserted.empid
END
Delete trigger like this:-
CREATE TRIGGER DeleteLogRecords
ON mainlog FOR DELETE
AS
BEGIN
DELETE FROM users2.dbo.sparelog WHERE users2.dbo.sparelog.empid=deleted.empid
END
Iam new to this DB coding,i think iam wrong with giving correct values with where condition..
thanks
Ramu
Ram7 from Hyderabad
28-Feb-13 4:44am
View
I have tried with ur above trigger,but iam finding errors like
Error:-"The multi-part identifier "deleted.Age" could not be bound"
I wrote the trigger like this....
"DELETE FROM users2.dbo.sparelog WHERE users2.dbo.sparelog.empid=deleted.empid"
I think iam wrong with where condition itself,i have the table structure with 5 columns like this:empid,Firstname,Lastname,Location,Age
can u please tell me where iam doing the mistake
Ram7 from Hyderabad
28-Feb-13 4:16am
View
Dear Babu,thanks for ur quick responce, i tried with ur above update,delete triggers,they were executed successfully, but here when delete trigger is executed the selected record is being deleted from mainlog table(source table) and in sparelog table it is inserting as a new record(duplicate record)Here my requirement is, the selected record from mainlog for delete it also should delete from sparelog table,rather inserting as a new duplicate record,the same thing is happing with update trigger also,the source table should be an exact replica of target table,please tell me how to rectify the above triggers to meet my exact requirement
Ram7 from Hyderabad
28-Feb-13 0:36am
View
Thanks khorshed,thanks for all ur valuable suggestions........
Ram7 from Hyderabad
28-Feb-13 0:09am
View
Thanks Khorshed,i will try with the above link, or else i will go with procedure,
can u please tell me,how many possible ways of migrating data from one server database to another,so that i can try with those alternatives
Ram7 from Hyderabad
27-Feb-13 23:53pm
View
Dear Khorshed,i have started Distributed Transaction Co-ordinator with help of ur above link,and again,iam getting the new error like below,please check the below error and guide me how to overcome this,thanks in advance..
Error:-"OLE DB provider "MSDASQL" for linked server "MYSQL" returned message "[MySQL][ODBC 5.1 Driver]Optional feature not supported".The operation could not be performed because OLE DB provider "MSDASQL" for linked server "MYSQL" was unable to begin a distributed transaction".
Ram7 from Hyderabad
27-Feb-13 7:05am
View
Dear Khorshed,thanks for ur responce, i have tried with ur above rectified trigger but iam getting an error like this:-
Procedure LogRecords, Line 9
MSDTC on server 'RAMU-IBX' is unavailable.
where 'RAMU-IBX'is my DSN name.Can u please guide me where iam doing mistake
Ram7 from Hyderabad
26-Feb-13 8:59am
View
Dear Reynolds thanx for ur responce, i have already created a linked server,and iam able to retrieve data,insert,update,delete with the help of distributed querys.And hear iam unable to copy a table data from sqlserver to mysql using a single trigger,can u please help me in thid..
Ram7 from Hyderabad
22-Feb-13 1:22am
View
Thanks a lot khorshed, i will go with
this.......
Ram7 from Hyderabad
22-Feb-13 1:04am
View
hii Khorshed thanks for ur responce,i have tried with linked server,but i didn't reached my requirement.Iam getting error with connection.can u also please guide me how to work on linked server or to provide any link to go with this.Iam trying to create linked server to mysql db from sqlserver db.............
Ram7 from Hyderabad
14-Feb-13 7:01am
View
hii gholam, almost a day i worked with ur link,iam getting the following error while configuring ODBC datasource please help me.
ERROR is:-connection failed:[HY000][MYSQL][ODBC 5.2(a)driver]can't connect to mysql server on "10.10.1.173"(10061)
Ram7 from Hyderabad
14-Feb-13 6:12am
View
ya, i got the connection string and i placed it in my web.config file
Ram7 from Hyderabad
14-Feb-13 5:43am
View
ok ok,fine i wil try with ur above steps..............
Ram7 from Hyderabad
14-Feb-13 5:24am
View
Hii Griff thanks for ur reponse,actually my requirement is with only database's not with front end,my question is how should i connect from one database to another database,and how should i transfer data,can perform operation b/w two different database's(SQL,& MYSQL).i.e Linked server concept.please help me in this way....thanks in advance
Ram7 from Hyderabad
12-Feb-13 23:43pm
View
Hi gholam,thanks for ur response,iam working on ur link............
Ram7 from Hyderabad
7-Jan-13 1:10am
View
Thank u vishwa, its working, thanks a lot
Ram7 from Hyderabad
13-Dec-12 1:00am
View
Hi Master, thanks for ur responce,from google i came to know that max limit is 1024,but iam searching for the reason why it is only 1024,can u help in this way
Ram7 from Hyderabad
11-Dec-12 22:50pm
View
Hii master, thanks for ur responce,nw iam going to try.................
Ram7 from Hyderabad
9-Dec-12 22:29pm
View
Thanku very much its working............................
Ram7 from Hyderabad
9-Dec-12 22:26pm
View
Hii,thanks for ur responce, i want code in asp.net technology
Show More