|
Hi,
As Prakash said, this is an issue with VS. I had faced similar problem just two days back. I had just clear the aspnet_wp.exe from the task manager, rebuild the application more than one times, then it got corrected. Try once more. it will work.
Best Wishes
Meeram395
|
|
|
|
|
Hello all,
i need to develop Content mgmt. system in ASP.NET/MySQL
any idea on how to start....?
|
|
|
|
|
I am trying to insert my COM Component into the toolbox of ASP.NET page using choose Items... but it is not embeddeding into the toolbox. sometimes it is visible in the tool box but in DISABLEd state.
How can I put my com component into the toolbox and make it Enable?
thnx in advance for suggestions
poojaaa
|
|
|
|
|
On Button Press, I am updating my userfeedback table certain columns, depending on who they are.
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL;<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.Checked+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+autoNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,strConnection2); <br />
<br />
da.Fill(ds);<br />
DataTable mytable =ds.Tables[0];<br />
DataRow myRow ; <br />
myRow = mytable.Rows[0];<br />
<br />
string n ;<br />
foreach(DataColumn c in mytable.Columns)<br />
{<br />
n = c.ColumnName;<br />
if(n=="RecNumber")<br />
{<br />
continue;<br />
}<br />
myRow[n] =ControlTypeCheck.CheckControlType(Page.FindControl(n),n);<br />
}<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);<br />
da.Update(ds);<br />
<br />
}<br />
catch(Exception err)<br />
{<br />
string str=err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}
Debug Error
C:\DIMHRS\HelpDesk\UserFeedBack.aspx.cs(426): Use of unassigned local variable 'strSQL'<br />
|
|
|
|
|
string strSQL;
maybe make it string strSQL = string.Empty;
|
|
|
|
|
Bloops, forgot to post, I got it right after I posted here... Yes the answer was needing to make the string empty, I did so by
string strSQL="";
Actualy, onto the next step of debugging, and almost certain this is my last debug error
Update of the code:
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL="";<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.Checked+"' WHERE autoNum="+TicketNum.Text;<br />
<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,strConnection2); <br />
<br />
da.Fill(ds);<br />
DataTable mytable =ds.Tables[0];<br />
DataRow myRow ; <br />
myRow = mytable.Rows[0];<br />
<br />
string n ;<br />
foreach(DataColumn c in mytable.Columns)<br />
{<br />
n = c.ColumnName;<br />
if(n=="RecNumber")<br />
{<br />
continue;<br />
}<br />
myRow[n] =ControlTypeCheck.CheckControlType(Page.FindControl(n),n);<br />
}<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);<br />
da.Update(ds);<br />
<br />
}<br />
catch(Exception err)<br />
{<br />
string str=err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}
Exception err is throwing
"Data type mismatch in criteria expression"
|
|
|
|
|
Why do people insist on catching errors they don't know how to handle then throw away useful information!
I would suspect that you shouldn't be getting a data type mismatch error at all, so why are you catching it here... Oh... I see because it it the button click event handler...
Why do you have database code in the presentation layer?! You'll be glad you don't work for the company I work for. It is written into out coding standards documentation that the use of data access code in a windows or web form is a sackable offence.
First, comment out the catch block. Find out exacly what is causing the exception and fix it.
|
|
|
|
|
This was surely not production code ? The giveaway is that the button is called Button1....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It wont be "production" for another 6 months. Again, though I bulid data collection websites for the govt. I have trained users, and on a secure server, that only my users have access too. The actual website, will be used for about 2 months, and then, never used again, and I will start another project.
|
|
|
|
|
1 - all your code is ripe for SQL injection attacks
2 - As has been said, you should never have DB code in your presentation layer
3 - As has been said, why catch exceptions and do nothing ?
4 - use string.Empty over "", as it's more efficient
5 - Give your controls meaningful names. When someone else looks at the code, how do they know which button was button1 ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: 4 - use string.Empty over "", as it's more efficient
Even better: assign null to the reference. That way if you try to use the value without assigning it a usable value, you will get a null reference exception instead of a cryptic error from the database.
Alternatively, add a default case in the switch, where you throw an appropriate exception. That way you don't have to assign anything to the variable before the switch statement, as the compiler knows that the variable always has a value when you exit the switch.
---
single minded; short sighted; long gone;
|
|
|
|
|
1. People have said this, but I still don't understand what they mean.
2. Why should you never have DB code in your presentation layer?
3. Actually, that is my most recent problem, the exception is catching an error, every value is updating the table, yet the exception err, is throwing "cannot find table 0"
4. I didn't even know you could do that, you would think the people that I work with that have degree's would code the write way, I guess not!
5. Eh, button1, I normaly do, this page actually only has one button it. I just hadn't gotten to renameing it.
Here is the most recent of my button1click,
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL="";<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
else<br />
{<br />
TicketClosedBy.Text="";<br />
}<br />
<br />
<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TLwho]='"+TLwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.SelectedValue+"' WHERE autoNum="+TicketNum.Text;<br />
<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [CPwho]='"+CPwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [ORAwho]='"+ORAwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [DMwho]='"+DMwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbDataAdapter da = new OleDbDataAdapter(strSQL,strConnection2); <br />
<br />
da.Fill(ds);<br />
DataTable mytable =ds.Tables[0];<br />
DataRow myRow ; <br />
myRow = mytable.Rows[0];<br />
<br />
string n ;<br />
foreach(DataColumn c in mytable.Columns)<br />
{<br />
n = c.ColumnName;<br />
if(n=="autoNum")<br />
{<br />
continue;<br />
}<br />
myRow[n] =ControlTypeCheck.CheckControlType(Page.FindControl(n),n);<br />
}<br />
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);<br />
da.Update(ds);<br />
<br />
}<br />
catch(Exception err)<br />
{<br />
string str=err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}<br />
<br />
}<br />
}
Error is - Cannot find table 0.
|
|
|
|
|
Cannot find table 0. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.IndexOutOfRangeException: Cannot find table 0.<br />
<br />
Source Error: <br />
<br />
<br />
Line 440: <br />
Line 441: da.Fill(ds);<br />
Line 442: DataTable mytable =ds.Tables[0];<br />
Line 443: DataRow myRow ; <br />
Line 444: myRow = mytable.Rows[0];<br />
<br />
<br />
Source File: c:\dimhrs\helpdesk\userfeedback.aspx.cs Line: 442 <br />
<br />
Stack Trace: <br />
<br />
<br />
[IndexOutOfRangeException: Cannot find table 0.]<br />
System.Data.DataTableCollection.get_Item(Int32 index)<br />
DIMHRS.HelpDesk.UserFeedBack.Button1_Click(Object sender, EventArgs e) in c:\dimhrs\helpdesk\userfeedback.aspx.cs:442<br />
System.Web.UI.WebControls.Button.OnClick(EventArgs e)<br />
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)<br />
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)<br />
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)<br />
System.Web.UI.Page.ProcessRequestMain()<br />
<br />
<br />
|
|
|
|
|
I rewrote the try, and also put in something to catch the Handle the Error.
private void UpdateFeedback_Click(object sender, System.EventArgs e)<br />
{<br />
bool bNoError =true;<br />
OleDbConnection con = new OleDbConnection(strConnection2);<br />
string strSQL="";<br />
DataSet ds = new DataSet();<br />
CUsers user =new CUsers();<br />
user=(CUsers)Session["SessionUser"];<br />
switch(user.Role)<br />
{<br />
case "TL":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
else<br />
{<br />
TicketClosedBy.Text="";<br />
}<br />
<br />
<br />
strSQL="UPDATE UserFeedback set [TLComment]='"+TLComment.Text+"', [TLwho]='"+TLwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"', [NeedAction]='"+NeedAction.SelectedValue+"' WHERE autoNum="+TicketNum.Text;<br />
<br />
break;<br />
case "CP":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [CPComment]='"+CPComment.Text+"', [CPwho]='"+CPwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "ORA":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [ORAComments]='"+ORAComments.Text+"', [ORAwho]='"+ORAwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "DMO":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [DMComments]='"+DMComments.Text+"', [DMwho]='"+DMwho.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
<br />
case "User":<br />
if(TicketStatus.SelectedValue=="Closed")<br />
{<br />
string strStatus="Closed";<br />
TicketClosedBy.Text = strStatus; <br />
<br />
}<br />
strSQL="UPDATE UserFeedback set [Comments]='"+Comments.Text+"', [TicketStatus]='"+TicketStatus.SelectedValue+"', [TicketClosedBy]='"+TicketClosedBy.Text+"' WHERE autoNum="+TicketNum.Text;<br />
break;<br />
} <br />
<br />
try<br />
{<br />
OleDbCommand cmd = con.CreateCommand();<br />
cmd.CommandText=strSQL;<br />
con.Open();<br />
cmd.ExecuteNonQuery();<br />
}<br />
catch(Exception err)<br />
{<br />
string s= err.Message;<br />
bNoError=false;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}<br />
<br />
if(bNoError)<br />
{<br />
Response.Redirect("../HelpDesk/UserFeedback.aspx");<br />
}<br />
else<br />
HandleErrors();<br />
}<br />
}<br />
|
|
|
|
|
Dear all,
I managed to return a full hyperlink with query string values from a database as a string and i bound it to a grid view HyperLinkField
My problem is that i want it to open as a pop up when clicked not to navigate withing the same page
I know i should use the window.open javascr5ipt function but i don't know where should i put it
I would appreciate any help or hint
Best Regards
3ala2
|
|
|
|
|
If you are returning an anchor tag then you just need to set the target to _blank
<A HREF="yoururl" target="_blank">
Hope that helps.
Ben
|
|
|
|
|
i want a pop up window not a new window
Best Regards
3ala2
|
|
|
|
|
First off all, yes I have googled it, and its such a vauge error code, that lots of pages that come up, arent helping much, Here is the error
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.<br />
<br />
Source Error: <br />
<br />
<br />
Line 70: }<br />
Line 71: string strWho = "";<br />
Line 72: strWho="Welcome "+user.UserID+" you are logged in as "+user.Role+" the date and time is now"+DateTime.Now.ToShortTimeString()+", "+DateTime.Now.ToShortDateString()+".";<br />
Line 73: Label2.Text = strWho;<br />
Line 74: Label2.Font.Bold = true;<br />
<br />
<br />
Source File: c:\dimhrs\helpdesk\userfeedback.aspx.cs Line: 72
and here is my page load.
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
if(!IsPostBack)<br />
{<br />
Panel1.Visible=false;<br />
LoadGrid();<br />
}<br />
string strWho = "";<br />
strWho="Welcome "+user.UserID+" you are logged in as "+user.Role+" the date and time is now"+DateTime.Now.ToShortTimeString()+", "+DateTime.Now.ToShortDateString()+".";<br />
Label2.Text = strWho;<br />
Label2.Font.Bold = true;<br />
<br />
user=(CUsers)Session["SessionUser"];<br />
QCDate.Text= DateTime.Now.ToShortDateString()+" "+DateTime.Now.ToShortTimeString();<br />
strAdd="; ["+user.UserID+" - Date: "+ QCDate.Text + "]: ";<br />
Review.Text=QCDate.Text.Insert(Review.Text.Length,strAdd);<br />
<br />
if(user.NeedActionHelp==true)<br />
{<br />
NeedAction.Enabled=true;<br />
}<br />
else<br />
{<br />
NeedAction.Enabled=false;<br />
if(Comments.Text!="" && NeedAction.Checked==false)<br />
{<br />
SJReview.Visible=true;<br />
}<br />
else if(Comments.Text=="" && NeedAction.Checked==false)<br />
{<br />
SJReview.Visible=false;<br />
}<br />
else<br />
{<br />
}<br />
}<br />
}
|
|
|
|
|
Ibuprofen wrote: strWho="Welcome "+user.UserID+" you are logged in as "+user.Role+" the date and time is now"+DateTime.Now.ToShortTimeString()+", "+DateTime.Now.ToShortDateString()+".";
Looks like the error is to do with the object user. Get the value of the userid and role into a string, debug and check if its got to do with the object user.
string strUserID = user.UserID;
string strRole = user.Role;
strWho="Welcome "+strUserID+" you are logged in as "+strRole+" the date and time is now"+DateTime.Now.ToShortTimeString()+", "+DateTime.Now.ToShortDateString()+".";
|
|
|
|
|
Thanks!
Just posting what came up next, I pretty sure I can fix this, just figure the more questions posted here, the better answer archieve we get.
Here's the Error
Cannot find column [System.Web.UI.WebControls.TextBox]. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Data.EvaluateException: Cannot find column [System.Web.UI.WebControls.TextBox].<br />
<br />
Source Error: <br />
<br />
<br />
Line 138: DataTable dt=ds.Tables[0];<br />
Line 139: string filterExp="autoNum="+autoNum;<br />
Line 140: DataRow[] rowFound= dt.Select(filterExp);<br />
Line 141: foreach (DataRow dr in rowFound)<br />
Line 142: {<br />
<br />
<br />
Source File: c:\dimhrs\helpdesk\userfeedback.aspx.cs Line: 140 <br />
and the majority of the load record
private void LoadRecord(string recNumber)<br />
{<br />
<br />
LoadGrid(); <br />
Panel2.Visible=false;<br />
Panel1.Visible=true;<br />
DataTable dt=ds.Tables[0];<br />
string filterExp="autoNum="+autoNum;<br />
DataRow[] rowFound= dt.Select(filterExp);<br />
foreach (DataRow dr in rowFound)<br />
{<br />
<br />
DateSubmit.Text=dr["DateSubmit"].ToString(); <br />
TicketNum.Text=dr["autoNum"].ToString(); <br />
SubmitBy.Text=dr["Name"].ToString();
|
|
|
|
|
Just had to create the string for my autoNum field.
|
|
|
|
|
Hi Developer
I have performed simple screen scrapping(reading contents of other website) many times. But now I need to go a bit advance...
Like if you visit: http://home.scci.com.pk/search.asp[^].
Now from that page I can grab 20 companies using "HTTP requests object" BUT I need to grab all the companies(20*784). Please note records changed while we change drop down list "Display Page".
Any Idea how to achieve this???
Lets work it Out.........!
|
|
|
|
|
You can do this by creating a windows based application by using AxSHDocVw.AxWebBrowser active x object. You need to follow following steps.
Step 1 - Grab the required page using the WebBrowser Control.
Step 2 - Using MSHTML we can locate various form fields, get the data of the current page using MSHTML.
Step 3 - Now locate the page dropdown list in the page get the selected value increment by 1 and fire the click event of the go button.
Step 4 – Repeat step 1 to 3 until you get all the data.
Regards,
Prakash Kalakoti
|
|
|
|
|
I'm using an ASP.Net menu control in a CSS controlled layout web application. The menu control and datasource are in a div in the Master page.
The problem I'm having is the menu items displaying underneath the controls in the Content Page and I don't seem to be getting anywhere by tring to set the z-index of items, (although I havn't gone completely gone down the tree of controls rendered by the .net framework yet). I'm also only looking at in IE 6 at the moment due to work constraints but will give it a go in Firefox tomorrow to see how it renders but in the meantime, has anyone else encountered this, have you found a way around it and if so how?
It's starting to drive me quite insane now so any help or pointers are greatfully appreciated...
...cheers!
Rhys
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it"
They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."
Terry Pratchett
|
|
|
|
|
I was experiencing some wierdness with menu controls in IE 7. What was happening to me was that the sub-menus of the menu control were appearing about 200px right of where they should have been.
What worked for me was to set the DIV containing the menu control to position:relative.
|
|
|
|
|