|
Seriously, what does this have to do with ASP.NET ?
There are converters between VB and C#. C# can also call VB.NET dlls. There are many solutions open to you that involve using the code on CP. Hell, just reading it and working out what it does should be trivial if you know C#.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
i've developed a web app. and i did it without having IIS installed.
Is it OK for me to upload the web app developed ?
Plz help.
|
|
|
|
|
I am assuming you developed the web app using visual studio. If that is the case, VS has a build in web server, called Cassini. It uses the build-in web server until you deploy your application.
You should be able to deploy it to IIS and run ok, assuming you copied all relevant files and your configuration is correct.
|
|
|
|
|
Hi There,
I want to know how to take value return by link to sql query in Dataset or Datatable.
If anybody knows please help.
Thanks
|
|
|
|
|
Do you want to know how to convert Linq to SQL query result into DataTable?
In that case, you cannot directly convert into Linq Resultset into DataTable. There are some work around solutions. Try this link
|
|
|
|
|
I have designed html editor for asp.net. My problem is if i type any msg inside that html editor, and click save button, the text is not accepted and it shows alert msg..... But in other browser the text is accpted...
Any Solution....
|
|
|
|
|
Well, in Safari do view source and see what is being rendered. That may give you a clue.
|
|
|
|
|
Hi, I jst viewed it and took the id for html editor for ex: "ctl00_cphEBizMaster_txtMessage". And i try to assigned it to some string variable like
String Message =Request.Form("ctl00_cphEBizMaster_txtMessage");
Am getting Error.....
|
|
|
|
|
Hi to all,
I know its a silly question to ask but for me it has become really big.I want the way how to achieve it.I googled a lot but didn't find any answer.
Actually I am working on a e-commerce portal.It is having around 1 lakh products.I have to implement navigation in the site. I think we cannot do it by hard coding the nodes in the xml file. There should be some way to connect it through the database.
But I don't know how?
So please assist me...Please give the steps to do it...
cheers,
sneha
|
|
|
|
|
|
how to get a runtime connection to a grid
|
|
|
|
|
first create a list that contain all the table which can be link to grid...........then by clicking to a particular name of list item....u can configure source name dynamically.............
|
|
|
|
|
Hi,
I'm using .net 2008.i've a datagrid named 'dgUserNote'.i have an EditCommandColumn in my grid.
<asp:editcommandcolumn canceltext="Cancel" edittext="Edit" headertext="Edit" updatetext="Update" xmlns:asp="#unknown">
and in coding part(c#) i written like;
void dgUserNote_UpdateCommand(object source, DataGridCommandEventArgs e)
{
SqlCommand SqlCom;
if (ConGlobal.State == ConnectionState.Closed) ConGlobal.Open();
SqlCom = new SqlCommand("SpInsertUserNote", ConGlobal);
SqlCom.Parameters.Add("@IorU", SqlDbType.VarChar).SqlValue = "U";
SqlCom.Parameters.Add("@Title", SqlDbType.VarChar).SqlValue = e.Item.Cells[2].Text;
SqlCom.Parameters.Add("@Description", SqlDbType.VarChar).SqlValue = e.Item.Cells[3].Text;
SqlCom.Parameters.Add("@Date", SqlDbType.VarChar).SqlValue = e.Item.Cells[4].Text;
SqlCom.Parameters.Add("@UserName", SqlDbType.VarChar).SqlValue = mdlNewClass.gStrUserName;
SqlCom.CommandType = CommandType.StoredProcedure;
SqlCom.ExecuteNonQuery();
Response.Write("Record Updated Successfully...");
dgUserNote.EditItemIndex = -1;
dgUserNote.DataBind();
}
the problem i that,i'm not getting the values in the cells ie: e.Item.Cells[2].Text="" like wise.why it's happend so. pls give me a solution.
Thanks&Regards
Princy
|
|
|
|
|
First you need to set the EditItemIndex property to the index of the item clicked in the DataGrid control to enable editing for that item.
void dgUserNote_Edit(Object sender, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = e.Item.ItemIndex;
BindUserNoteGrid();
}
If you have used bound columns, the edited value is stored in a TextBox in the Update event.
The TextBox is the 0th control in a cell's Controls collection.
Each cell in the Cells collection of a DataGrid item representsa column in the DataGrid control.
Change your code like below and then use the TextBox values in SQL Parameters.
TextBox titleText = (TextBox)e.Item.Cells[2].Controls[0];
TextBox descriptionText = (TextBox)e.Item.Cells[3].Controls[0];
|
|
|
|
|
hi
i have code at grid view editing have proble at update time
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//fetch datakey/primarykey for identifyning the row
string materialrecipt_no = Convert.ToString(GridView1.DataKeys[e.RowIndex].Value);
TextBox materialrecip_date = (TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[1];
TextBox pqty = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].Controls[1]);
TextBox enterby = ((TextBox)GridView1.Rows[e.RowIndex].Cells[4].Controls[1]);
TextBox ptype = ((TextBox)GridView1.Rows[e.RowIndex].Cells[5].Controls[1]);
TextBox remark = ((TextBox)GridView1.Rows[e.RowIndex].Cells[6].Controls[1]);
SqlCommand com = new SqlCommand("update material_incoming set materialrecip_date='" + materialrecip_date.Text + "',pqty='" + pqty.Text + "',enterby='" + enterby.Text + "',ptype='" + ptype.Text + "',remark='" + remark.Text + "' where materialrecipt_no=" + materialrecipt_no + "", conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
GridView1.EditIndex = -1;
//to go back to the previous position
// fetch and rebind the data.
BindGrid();
}
but it gives an error
error is
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
|
|
|
|
|
Set a break point in your code, Find which line of code throws the error
check the following
e.RowIndex - if it is a negative value, it may throw an error at GridView1.Rows[e.RowIndex]
Cells collection - check whether indexs of the grid cells are within the range.
|
|
|
|
|
Hi,
What i think the problem is in the place where you refer to your control using Cells[index].Controls[1] and there would have been only one control and that too at position [0] not [1]. So try using the code like this as you do know the name of the control which you want to fetch using the code for updation purpose.
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//fetch datakey/primarykey for identifyning the row
string materialrecipt_no = Convert.ToString(GridView1.DataKeys[e.RowIndex].Value);
TextBox materialrecip_date = (TextBox)GridView1.Rows[e.RowIndex].FindControl("ControlName");
TextBox pqty = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("ControlName"));
TextBox enterby = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("ControlName"));
TextBox ptype = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("ControlName"));
TextBox remark = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("ControlName"));
SqlCommand com = new SqlCommand("update material_incoming set materialrecip_date='" + materialrecip_date.Text + "',pqty='" + pqty.Text + "',enterby='" + enterby.Text + "',ptype='" + ptype.Text + "',remark='" + remark.Text + "' where materialrecipt_no=" + materialrecipt_no + "", conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
GridView1.EditIndex = -1;
//to go back to the previous position
// fetch and rebind the data.
BindGrid();
}
Please mark as answer if problem gets resolved.
Regards,
Kaushal Arora
|
|
|
|
|
hi friends,
tis s saravanan, i am dng a project on automatic software update where a server system can easily update a software in an automated manner without manual intervention,for example an antivirus program. I am using asp.net for coding and windows platform.i tried many ways of dng it.. can anyone help me in telling efficient and simple way to do it..??? the basic idea is instead of using net services for updating a software,v can use the update frm server.pls reply soon.
thank you/..
|
|
|
|
|
Just deploy with clickonce and it will work by itself. If you want to write something, then you just need a program to contact a server with a version number, and the server to send a higher version if it exists.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi all
I have two panel on my web page and i have declared a array
on some button click i m filling this array in first panel and making the first panel false.
now on second panel button click i want to get the value but i is giving nothing
Check my code:
Public SV As SSValue
Public Structure SSValue
Dim VNumber As String
End Structure
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
// Some code
End Sub
// First panel button click
Protected Sub btnGeneratePayment_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGeneratePayment.Click
If GeneratePaymentRecord() = True Then
Dim VNumber As String = GetVoucherValue("PV")
If VNumber <> -1 Then
txtVNumber.Text = "PV - " + VNumber
Else
lblError.Text = "Problem while reterving BillNumber"
Exit Sub
End If
Save.VNumber = txtVNumber.Text
end if
dvMain.Visible = False
dvShowData.Visible = False
end sub
// second panel button click
Public Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
dim VNumber as string = Save.VNumber
end sub
Er. Jagwinder Singh
|
|
|
|
|
First no array is declared in your code.
Fill the array in the first Panel and store it in Session object, and then load it in the second panel.
|
|
|
|
|
Hi,
I am Encoding my Url like :
Response.Redirect("~/Default.aspx?"+Server.UrlEncode(("I1=18&I2=1&I3=506")));
It is working Fine,But When i tried to Decode the Url like :
Server.UrlDecode(Request.QueryString.ToString());
It is not working as expected , It is returning the Count of Query String as 1,But i expect it as 3,
Plz help me how to Decode the Querystring ?
Thanx in Advance!!!!
|
|
|
|
|
there r several predefined algorithm in .net security package which can be used dirctly to encode &decode the url............ok
|
|
|
|
|
i used the Server.EncodeUrl() method , i am talking based on this.
|
|
|
|
|
You should not encode the whole string "I1=18&I2=1&I3=506".
Since you are encoding the three query strings I1=18&I2=1&I3=506 into one, it is loaded as a single query string in the target page.
To avoid this, Encode querystring parameter I1 and the value 18 separately and join using '=' operator.
Repeat this for next paramters and theri values and join with the previous set using '&'.
It should be like below
Response.Redirect("~/Default.aspx?"+ "encodeedI1=encoded18& encodedI2= encoded1& encdoedI3=encoded506";
Then only you can get three Query Strings in the Default.aspx.
|
|
|
|