|
<asp:TemplateField>
<ItemTemplate>
<asp:Button runat="server" CommandName="BtnUpdate" CommandArgument='<% Eval("PrimaryKeyField") %>' />
</ItemTemplate>
</asp:TemplateField>
himanshu
|
|
|
|
|
I have to develop an application, which can able to connect to a GPS device which is connected to serial port in our system and also able to read all the data from the device.
Currently I am able to make connection to my system's serial port but not able to connect to that GPS device and also not able to read the data from the device.
So in brief problem is that, "how we read the device which is connected to our system's serial port."
Please help me out to solve this problem.
|
|
|
|
|
avika wrote: Please help me out to solve this problem.
You are in wrong forum. It has nothing to with ASP.Net.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have to develop this in ASP .Net web application. I got some information regarding to Serial Port classes and methods from MSDN but still not able to get it. Please help me if you have any idea regard to this.
|
|
|
|
|
avika wrote: I have to develop this in ASP .Net web application.
AFAIK, this is no ASP.Net thing.
avika wrote: Please help me if you have any idea regard to this.
Did you look at this[^]?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Are you trying to build a web application that connects to the serial port of the clients PC? You won't be able to do that with ASP.net.
|
|
|
|
|
I am able to connect to serial port but not able to read the data from the connected device. Here is the code which i am using to read the device-
// Create the serial port with basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
port.Handshake = System.IO.Ports.Handshake.None;
port.ReadTimeout = 5000;
port.Open();
//retrieve number of bytes in the buffer
int bytes = port.BytesToRead;
//create a byte array to hold the awaiting data
byte[] comBuffer = new byte[bytes];
//read the data and store it
port.Read(comBuffer, 0, bytes);
string str;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
str = enc.GetString(comBuffer);
txtData.Text = str;
port.Close();
when i am running this code then I get 0 in BytesToRead and comBuffer.
I think i am doing something wrong but what it is not have any idea.
|
|
|
|
|
Hi all ,
Is it possible to create short cut keys in ASP.Net to navigate between pages.
Thanks ,
Amit PAtel
|
|
|
|
|
Amit Patel1985 wrote: Is it possible to create short cut keys in ASP.Net to navigate between pages.
The simple answer to this is a NO.
Though you can do something with JavaScript [^]to achive this.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello,
I want to develop a web chat application. In this application the user Just need to login to the webpage and can be able to chat with the other users who are logged in at that point of time. This application that i want to develop resembles GTalk that we can use once we sign in to or gmail account. This application is completely web application which doesn't need any installation.
I need to develop this application in ASP.Net. In future this application can be enhanced with Remote Desktop viewing as well.
->Can any one suggest me the approach(logic of exchanging data between 2 users) and the technology that I can Implement so that i will not stuck in future. I don't need Code, just outline flow of implementation will satisfy my need.
->If you have any Idea how Web based GTalk was Implemented? I mean the approach the followed by Google.
Please help me in this Regard.
|
|
|
|
|
Well, there and already thousands(or probably more) examples of this on internet.
Did you try even once to look for something very simple like this[^]?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
I am creating 5 rows dynamically in a grid view.
I need Edit a particular row and i have to save the changed row to database , how to do this, plz answer me... as well as any sample code will be more helpfull for me...
|
|
|
|
|
|
Can anybody please advice me on which is the best open source CMS model that can be used for developing applications in .NET
Thanks,
Priya.
|
|
|
|
|
Use FCK-Editor.
Try this link
FCK Editor[^]
Regards,
Karthik K...
|
|
|
|
|
Thanks Karthik, Will give it a try.
|
|
|
|
|
Always welcome and good luck.
Regards,
Karthik K...
|
|
|
|
|
I think this is only for editing text..
Is there any other CMS system for complete integration with .net application like developing new pages,providing means to add menus etc
|
|
|
|
|
|
|
hi guys i just want to perform custom paging in which at the footer of the grid view ,there must be a pager 'pervious/next with numeric'
this is what i did
[SIZE="4"][B]in aspx page[/B] [/SIZE]
<asp:GridView ID="TableGridView"
OnPageIndexChanging="TableGridView_PageIndexChanging"
runat="server" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting="True" >
</asp:GridView>
<asp:Button ID="btnConnect" runat="server" Style="z-index: 113;
left: 260px; position: absolute; top: 143px" Text="Connect & Populate" OnClick="btnConnect_Click" />
[B][SIZE="4"]in code behind page [/SIZE][/B]
public partial class _Default : System.Web.UI.Page
{
public static DataTable Table = new DataTable();
ArrayList ParameterArray = new ArrayList();
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack && (bool)Session["IsConnectionInfoSet"]==true)
CreateTemplatedGridView();
}
protected void TableGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//CreateTemplatedGridView();
TableGridView.PageIndex = e.NewPageIndex;
TableGridView.DataBind();
}
protected void btnConnect_Click(object sender, EventArgs e)
{
Session["IsConnectionInfoSet"] = true;
CreateTemplatedGridView();
}
void PopulateDataTable()
{
Table = new DataTable();
TableGridView.Columns.Clear();
SqlDataAdapter adapter = new SqlDataAdapter("select * from customer", "Data Source=OPWFMS-7KYGZ7SB;Initial Catalog=Mayank;User ID=sa;Password=sa");
adapter.Fill(Table);
}
void CreateTemplatedGridView()
{
// fill the table which is to bound to the GridView
PopulateDataTable();
// add templated fields to the GridView
TemplateField BtnTmpField = new TemplateField();
BtnTmpField.ItemTemplate =
new DynamicallyTemplatedGridViewHandler(ListItemType.Item, "...", "Command");
BtnTmpField.HeaderTemplate =
new DynamicallyTemplatedGridViewHandler(ListItemType.EditItem, "...", "Command");
TableGridView.Columns.Add(BtnTmpField);
for (int i = 0; i < Table.Columns.Count; i++)
{
TemplateField ItemTmpField = new TemplateField();
// create HeaderTemplate
ItemTmpField.HeaderTemplate = new DynamicallyTemplatedGridViewHandler(ListItemType.Header,
Table.Columns[i].ColumnName,
Table.Columns[i].DataType.Name);
// create ItemTemplate
ItemTmpField.ItemTemplate = new DynamicallyTemplatedGridViewHandler(ListItemType.Item,
Table.Columns[i].ColumnName,
Table.Columns[i].DataType.Name);
//create EditItemTemplate
// then add to the GridView
TableGridView.Columns.Add(ItemTmpField);
}
// bind and display the data
TableGridView.DataSource = Table;
TableGridView.DataBind();
}
}
[SIZE="4"][B]and in the class file[/B][/SIZE]
public class DynamicallyTemplatedGridViewHandler : ITemplate
{
ListItemType ItemType;
string FieldName;
string InfoType;
public DynamicallyTemplatedGridViewHandler(ListItemType item_type, string field_name, string info_type)
{
ItemType = item_type;
FieldName = field_name;
InfoType = info_type;
}
public void InstantiateIn(System.Web.UI.Control Container)
{
switch (ItemType)
{
case ListItemType.Header:
Literal header_ltrl = new Literal();
header_ltrl.Text = "<b>" + FieldName + "</b>";
Container.Controls.Add(header_ltrl);
break;
case ListItemType.Item:
switch (InfoType)
{
case "Command":
break;
default:
Label field_lbl = new Label();
field_lbl.ID = FieldName;
field_lbl.Text = String.Empty; //we will bind it later through 'OnDataBinding' event
field_lbl.DataBinding += new EventHandler(OnDataBinding);
Container.Controls.Add(field_lbl);
break;
}
break;
}
}
private void OnDataBinding(object sender, EventArgs e)
{
object bound_value_obj = null;
Control ctrl = (Control)sender;
IDataItemContainer data_item_container = (IDataItemContainer)ctrl.NamingContainer;
bound_value_obj = DataBinder.Eval(data_item_container.DataItem, FieldName);
switch (ItemType)
{
case ListItemType.Item:
Label field_ltrl = (Label)sender;
field_ltrl.Text = bound_value_obj.ToString();
break;
}
}
}
[SIZE="4"][B]but for my requirements I want to use that code [/B][/SIZE]
class NumericWithNext : ITemplate
{
GridView localGrid;
int intSlotNo = 0;
#region CONTRUCTOR
public NumericWithNext(GridView gv)
{
localGrid = gv;
//intSlotNo = slotNo;
intSlotNo = localGrid.PageIndex / 10;
//constructor
}
public void InstantiateIn(Control container)
{
LinkButton prevTenRecords = new LinkButton();
prevTenRecords.Text = "Previous 10 Pages";
prevTenRecords.CssClass = "PagingLnks";
prevTenRecords.CommandArgument = ((intSlotNo - 1) * 10 + 1).ToString(); ;
prevTenRecords.CommandName = "Page";
//prevTenRecords.Click += new EventHandler(prevTenRecords_Click);
prevTenRecords.Width = Unit.Pixel(125);
if (intSlotNo > 0)
{
container.Controls.Add(prevTenRecords);
}
LinkButton nextTenRecords = new LinkButton();
nextTenRecords.Text = "Next 10 Pages";
nextTenRecords.CommandName = "Page";
nextTenRecords.CommandArgument = ((intSlotNo + 1) * 10 + 1).ToString();
// nextTenRecords.Click += new EventHandler(nextTenRecords_Click);
nextTenRecords.CssClass = "PagingLnks";
nextTenRecords.Width = Unit.Pixel(118);
// nextTenRecords.Visible = false;
LinkButton prev = new LinkButton();
prev.Text = "Previous Page";
prev.CssClass = "PagingLnks";
prev.CommandArgument = "Prev";
prev.CommandName = "Page";
prev.Width = Unit.Pixel(90);
if (localGrid.PageIndex > 0)
{
container.Controls.Add(prev);
}
//for (int pagenum = 1; pagenum <= localGrid.PageCount; pagenum++)
for (int pagenum = (intSlotNo*10)+1; pagenum <= (intSlotNo+1)*10; pagenum++)
{
if (pagenum > localGrid.PageCount)
{
nextTenRecords.Visible = false;
break;
}
LinkButton pageInd = new LinkButton();
if (pagenum == localGrid.PageIndex + 1)
{
//pageInd.ForeColor = System.Drawing.Color.Green;PagingSelected
pageInd.CssClass = "PagingSelected";
}
else
{
pageInd.CssClass = "PagingLnks";
}
pageInd.ID = "PageInd_" + pagenum;
pageInd.Text = pagenum.ToString();
pageInd.CommandName = "Page";
pageInd.CommandArgument = pagenum.ToString();
container.Controls.Add(pageInd);
pageInd.Width = Unit.Pixel(10);
}
LinkButton next = new LinkButton();
next.Text = " Next Page";
next.CommandName="Page";
next.CommandArgument = "Next";
next.CssClass = "PagingLnks";
next.Width = Unit.Pixel(80);
if (localGrid.PageIndex < localGrid.PageCount - 1)
{
container.Controls.Add(next);
}
container.Controls.Add(nextTenRecords);
}
void nextTenRecords_Click(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not implemented.");
intSlotNo++;
}
void prevTenRecords_Click(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not implemented.");
intSlotNo--;
}
plz let me know how can i do that
|
|
|
|
|
did u got the solution ? if not reply me i will giv eu
sabarimd
|
|
|
|
|
no,i did not get the solution
|
|
|
|
|
hi sir
please help me
i have a gridview and one column of gridview contain linkbutton another column has visibility false and named as locked.
locked column contain value y and n.
now suppose i click on link button then i want to change the value of locked column for that particular row.
how it will possible.
|
|
|
|
|
Hi All,
can any one please say any method is available for finding out number of hits by a user on a single page? (not site visit)
Regards
Lijo
|
|
|
|