Hello,
I am developing an asp page where i need to search records according to bar-code using bar-code scanner.
while running the application in local machine its working perfectly.
but after uploading to server all validations are working except viewing records.
Can anyone help me ? please revert me back.
Thanks in advance !
--Code--
string GetLast(string source, int tail_length)
{
if (tail_length >= source.Length)
return source;
return source.Substring(source.Length - tail_length);
}
DataTable GetDetail(string Value)
{
DataTable dt = new DataTable();
try
{
clsTranscript ct = new clsTranscript();
dt = ct.GetSU_IDDetail(Value);
return dt;
}
catch (Exception ex)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "key1", "alert('" + ex.Message + "');", true);
return dt;
}
}
--On Button Click Event---
string entryValue = txtBarcode.Text.Trim();
string SearchValue = string.Empty;
if (rbBarcode.Checked == true)
{
SearchValue = GetLast(entryValue, 3);
}
if (SearchValue != string.Empty)
{
DataTable dtDetail = GetDetail(SearchValue);
if (dtBillCol.Rows.Count > 0)
{gvBillCol.DataSource = dtBillCol;
gvBillCol.DataBind();
}}