|
Hi buddy,
I don't think so that you can share any variable or object with Javascript(ClientSideScript) and C#(ServerSideScript). And if you want to use variable then you can use hidden field server side so both C# and Javascript can access it easily.
Hope it will help
http://techiefromsurat.blogspot.com/
|
|
|
|
|
The easiest way is a hidden field on the page, use that to pass values back to C#. An AJAX call works too, but if you're not using AJAX, a hidden field is easier.
Christian Graus
Driven to the arms of OSX by Vista.
"Iam doing the browsing center project in vb.net using c# coding" - this is why I don't answer questions much anymore. Oh, and Microsoft doesn't want me to.
|
|
|
|
|
Hi
mmm is it any example in ajax that explain how to do it ?
regards
dghdfghdfghdfghdgh
|
|
|
|
|
|
Hi lipi,
I hope you have heard about GridView inside GridView.
Just try that you can easily do that.
If you haven't heard about that just go through this code,
Put one GridView on aspx page with inside This master gridview put another gridview with name 'GridView2' ok
Write RowBound event of GridView1(Master gridView)
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow row = e.Row;
if (row.DataItem == null)
{
return;
}
GridView gv = new GridView();
gv = (GridView)row.FindControl("GridView2");
//Prepare the query for Child GridView by passing the Employee ID of the parent row
DataSet ds = ChildDataSource(((DataRowView)e.Row.DataItem)["employeeID"].ToString());
gv.DataSource = ds;
gv.DataBind();
}
Here is the ChildDataSource Method
private DataSet ChildDataSource(string strEmployeeId)
{
DataSet ds = new DataSet();
string Query = "Select * from Employee_Master where EmployeeId='" + strEmployeeId+ "'";
// This is my structure to access data ok just use here your code
ds = dataacesslayer.SqlHelper.ExecuteDataset(DBCon.ConnectionString, CommandType.Text, Query);
return ds;
}
And let me know is your problem solved or not?
http://techiefromsurat.blogspot.com/
|
|
|
|
|
Hello Friends..
I have one website(asp.net with C#) which have .csproj file.
when i open that website it cant convert that
website to compatible version until i remove that .csprob file.
If i remove the file and open the website than it runs cool
but it puts me in one trouble in which i cant able to edit the code.
Can any one help me regarding this?? this is very urgent for me....
plz reply ASAP.......
thanks in advance
KIRANKUMAR ROY.
+91-9998847534
kirankumar.roy@gmail.com
|
|
|
|
|
Hi Raviraj,
Delete that .csproj file.
Go to Visual Studio or Visual WebDeveloper Express (whatever you are using).
There Go File-> Open Website. Then Browse your website folder (the one having web.config on root). Open the website.
Try this. This May work.
Thanks,
Padmanabh
|
|
|
|
|
Hi Padmanabh
I am very thank ful for your reply.
I have tried this before.
it will allow me to open website But actual problem is
when i edit some code and try to debug than it will not allow me.
It not give error or message.
It simply debug the line which are previously located on my break point.
suppose i have below code
1 switch (selectedRole)
2 {
3 case (0):
4 // undefined
5 break;
6 case (1):
7 // member
8 viewControls(false, true, false, false);
9 break;
10 case (2):
11 case (3):
12 case (4):
13 // admin, financial controller & marketing manager
14 viewControls(true, false, false, false);
15 break;
16 }
now if i remove the case 2 and 3 from above switch
and put new code than it will debug above one only.
|
|
|
|
|
Hi Raviraj,
Strange. I didnt face such behaviour in past.
Well, do one thing.
If your Website does not have huge number of files then
create a new Website project and add your old files one by one. Then try to build the complete website and check what happens.
Thanks,
Padmanabh
|
|
|
|
|
Hi Padmanabh
I have tried this one also.
i have created new webpages in my site with same name.
it also not working.And my site contain more than 50 pages.
So it is difficult to make whole new site.
i have very tight dead line.
Regards.
|
|
|
|
|
Ha Ha Ha
No programmer in the world has loose deadlines.
Creating the new Web project didnt work. Creating new files in new Web project didnt work.
Then I am having a feeling that...
May be some of your files have gone corrupt.
|
|
|
|
|
Hi Padmnabh
So is there any solution for this.i need to slove this because i dont want to loose my 3rd deadline also.
Hope you can understand.
|
|
|
|
|
Last thing I can suggest is
1) Create a blank solution.
2)Under it create a new Web Project.
3)The Directory structure will be created. (Have this directory structure seperate from your current structure)
4)Under that copy paste the aspx and aspx.cs files, images files, App_Code files etc.
5)Whatever dll references you have given redo them again in your new Web Project.
6)Do all your web.config coding again either by Configuration tool or by hand.
7)If you have other class liabrary projects for the same Web Project then you have to do the same steps for these projects as well. Build these class liabrary projects individually.
8)Reassign the reference for these projects in your Web Project
9)Build the entire solution and check.
If this does not work then only seniors there can help you.
|
|
|
|
|
Its not a good idea to put your personal details on a forum where everyone can see them.
|
|
|
|
|
Eyeseetee Thank you very much for your advice....
|
|
|
|
|
How to Create PDF file from EasyPDF using asp.net in Thai Language?
|
|
|
|
|
The logical place to look for an answer to that question would be the site of the author of the tool. Have you tried that?
Try to come up with a better subject line the next time, using a subject that is the same as the group is just like not using any subject at all...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
can you please elaborate little bit more
Cheers!!
Brij
|
|
|
|
|
Hai All,
I need little help in asp.net gridview, i want to create a gridview in which the column width is fixed and the data in the column should have dot line(somthing data....) if it the length of the data is more than the width? Can an give me an idea? or suggestions. That will great for me..
Can any one???
Thanks in Advance....
with regards,
Senthil.S
A Software Engineer
|
|
|
|
|
Hi Senthil,
You can use GridView's RowDataBound Event for your task. The RowDataBound Event is raised while binding each and every row from DataSource. Here you can check the string length and do the stuff you want to do on it.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[3].Text.Length > 150)
{
}
}
}
I Hope This Helps.
Thanks,
Padmanabh
|
|
|
|
|
Just do one thing take that column as tamplate column and wite a protacted function from code behind
in that protacted function u just take the data from the database column which u have to dispaly and count the lenght of the String and take one for loop from 0 to say 50 words and take one string builder and create one table from code behind when the looop reaches the maximum character u have provide then take one ancor tag dispaly.... and u can navigate to next page for whole description of that column
|
|
|
|
|
HI Senthil
Use this code in Aspx page inside gridview
<asp:templatefield xmlns:asp="#unknown">
<headertemplate>Column Heading
<itemtemplate>
<%#FormatString(Eval("ColumnName").ToString(),20)%>
in .cs file just write down this function
public string FormatString(string strval, int length)
{
string temp = strval;
if (temp.Length > length)
temp = temp.Substring(0, length - 3) + "...";
return temp;
}
Just guese here I am passing 20 as a lenth variable so it will add ... if string is more than 20 characters
http://techiefromsurat.blogspot.com/
|
|
|
|
|
use css style for table Cell.
this can be added from server side while rendering the grid cell.
style.textOverflow = 'ellipsis'
Or you can iterate the grid cells as TD , set the below attribute to the TD.
TDCell.style.textOverflow = 'ellipsis'
|
|
|
|
|
hi,
how to develop website without using update panels using ajax...
since i m using many update panels in a single page it takes more time to load. so i m trying to avoid update panels in my site...
Ashok
|
|
|
|
|
Means you want to use AJAX but not updatepanels.
If it is right then you've the option of using XMLHTTPRequest and XMLHTTPReponse object using XML.By this send the data to server and get the response.
Cheers!!
Brij
|
|
|
|