Click here to Skip to main content
15,915,764 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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();

}}
Posted
Updated 15-Sep-14 23:43pm
v3
Comments
Kornfeld Eliyahu Peter 16-Sep-14 5:12am    
Can you elaborate on 'not working'?
dibyaaryan007 16-Sep-14 5:17am    
in local machine after clicking search button its showing records in gridview but after uploading application to server while accessing from client side its not showing any record of same bar-code. few server-side validations are working and showing alert. but not showing result.
Kornfeld Eliyahu Peter 16-Sep-14 5:19am    
You may see what records are returned (in debugger and/or SQL profiler)...
dibyaaryan007 16-Sep-14 5:28am    
sorry to say i am not getting.
Kornfeld Eliyahu Peter 16-Sep-14 5:30am    
So the problem is there - you may work on a different DB?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900