|
hello every body
I am unable to insert data into a db using a store procedure in the LINQ to SQL .The code is:
LinqToSQLDataContext dc = new LinqToSQLDataContext();
info inf = new info { Id = 1, name = "Ali" ,infoD="he is agood boy"};
dc.UserDetails.InsertOnSubmit(inf);
dc.SubmitChanges();
but the error is system.data.table.InsertOnSubmit has some invalid arguments
|
|
|
|
|
tanweer akhtar wrote: dc.UserDetails.InsertOnSubmit(inf);
I guess inf is not the same type of data object in the table UserDetails.
|
|
|
|
|
Dear All,
I am looking for a way where I want to pass javascript variable to asp.net function
bellow is what I am doing right now
function openWindowWithArg()
{
var myParam = window.dialogArguments;
var param = document.getElementById('TextBox1');
param.value = myParam.param;
<%bindAdvancedFilterData("1,2"); %>;
<%bindAdvancedFilterData(param.value); %>;
}
any ideas how i can pass param.value to the asp.net method bindAdvancedFilterData()?, I can do this using query string and session but May be it should be possible to do it like this?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Why dont u use hidden field..?
are u trying to call a method?
what is bindAdvancedFilterData()? in here..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
well, I am calling openWindowWithArg function in onload of body as bellow
<body onload="openWindowWithArg();">
and the function
<%bindAdvancedFilterData("1,2"); %>; is asp.net function which I am calling it from javascript.
How to pass javascript variables to asp.net method? which I want to do it as bellow
function openWindowWithArg()
{
var myParam = window.dialogArguments;
var param = document.getElementById('TextBox1');
param.value = myParam.param;
<%bindAdvancedFilterData(param.value); %>;
}
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
thanks for reply, well I am not doing postback, If you I call that function in body load.
If I do post back then Its possible to do it but since I am looking to do it only in body load.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
Because you don't always need to use a hidden field.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Developers in Afghanistan strange
|
|
|
|
|
thanks for your strange, I think It shouldn't be strange. using Ajax is the simplest way which I am not willing to use.there are other solutions like using QueryString and Sesstion which I can use. but I thought of using javascript which I think this could be impossible.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
pagemethods in asp.net ajax , help u to call any function from aspx page in code page just google pagemethods
|
|
|
|
|
thanks for reply, You are asking me to use asp.net ajax and I am saying, I am in an envoirnment where no ajax should be used. every thing should be done through javascript and c#.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
I'm using FCKEditor in one of my pages....it was working fine....recently when i load that page in the place of the editor it shows "page cannot be found"....but when i run application in my local system it is working fine...
i even tested with live data in my local application everything is fine...there is no problem with the data, it is the editor that is not loading in my live application...any suggestions??
|
|
|
|
|
There might be the problem with path.
The path/relative path w.r.t root folder might have been changed on deploying to the live server.
Also check whether all the files and folders required for FCK editor has been copied to the server.
|
|
|
|
|
yea it is problem with the path, now its working...thanx yaar...
previously it was like folder/subfolder/../fckeditor, i changed it too ~/fckeditor
|
|
|
|
|
Hi! my english is bad,sorry.
I work on a project management examen marks with C#.
i have Table semester (id_semestre, libel_semestre )
table module (id_module,libel_module)
matière(id_matière,libel_matière)
module and matière are dynamic the user can delete or add data
I'm looking for a way to :if I click on a semester display modules and if I click on module i display materieres of the module.
Thanks
|
|
|
|
|
.Net Remoting y it is used
|
|
|
|
|
It is used to connect to www.google.com[^] so you can look up the answer yourself.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
To remote, using .Net.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
|
I have a problem with a checkbox. CheckedChanged event is triggered each time I update my result set.mi page is as follows:
Image Example
1.i show the records of the team 1 and team 2.
2.uncheck the firts row of the team1 fire the event and all is ok .
3.when i show the team 2 the event fire again and change te status of the checkbox.
I have an UpdatePanel->GridView->Columns->TemplateField
aspx code:
<asp:TemplateField HeaderText="Alineable">
<ItemTemplate>
<asp:CheckBox ID="chkEstatus" Checked=' <%# ((string)Eval("Estatus"))=="Alineable"?true:false%>'
runat="server" AutoPostBack="True" OnCheckedChanged="chkEstatus_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
C# code OnLoad event. in each posback i call the Filter Method and Fill the gridview
protected override void OnLoad(EventArgs e)
{
if (Utileria.ValidarSesion(Session["Usuario"], 0))
{
if (!Page.IsPostBack)
ObtenerEquipos();
usuario = (Usuario)Session["Usuario"];
Filtrar();
}
}
C# code of the event:
protected void chkEstatus_CheckedChanged(object sender, EventArgs e)
{
int jugadorId;
try
{
CheckBox chkAlineable = (CheckBox)sender;
int rowIndex = ((GridViewRow)chkAlineable.Parent.Parent).RowIndex;
jugadorId = (int)gvJugadores.DataKeys[rowIndex].Value;
Roster roster = new Roster();
roster.EquipoId = int.Parse(ddlEquipos.SelectedValue);
roster.JugadorId = jugadorId;
roster.Estatus = chkAlineable.Checked ? "Alineable" : "Inalineable";
roster.ActualizarEstatus(null);
Filtrar();
upJugadores.Update();
}
catch { throw; }
}
C# code of the to fill the gridview
private void Filtrar()
{
gvJugadores.DataSource = JugadoresColeccion.FiltrarRoster(ddlOpcionesBusqueda.SelectedValue, txtBusqueda.Text, int.Parse(ddlEquipos.SelectedValue));
gvJugadores.DataBind();
}
I need to avoid this behavior becouse the checkbox state change my data.
I conclude that the status of the checkbox to be different in the other resultset automatically fires the event that are in the same row.
but I don´t know how to solve it. please help.
|
|
|
|
|
Then just don't fill the grid on postback
if (!Page.IsPostBack)
{
ObtenerEquipos();
Filtrar();
}
I know the language. I've read a book. - _Madmatt
|
|
|
|