|
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.
|
|
|
|
|
We have an online library with thousands of 'content collections' using a out of box solution call NXT. There is a small help 'application' developed in house that handles foot notes and that sort of thing. There are links in the document, which calls this little asp application, which returns content from a separate database. I am in the process of rewriting these asp pages in .NET 2.0 and adding functionality (new methods of searching, etc). Now, updating every single link in every single content collection to link to Search.aspx rather than Search.asp is not feasible. So I thought I would write an httphandler to internally redirect requests to .asp pages to .asps pages. The problem is I only get blank pages now, I can debug and step through the handler and everything seems ok. Here is the ProcessRequest method from the handler:
public void ProcessRequest(HttpContext context)
{
string url = context.Request.Path + "x";
if (context.Request.QueryString.Count > 0)
url = string.Format("{0}?{1}", url, context.Request.QueryString.ToString());
context.RewritePath(url, false);
}
And the web.config section:
<httpHandlers>
<add verb="*" path="*.asp" type="Project.HttpHandlers.AspToAspx, Project.HttpHandlers" />
</httpHandlers>
I'm sure I'm missing something simple. Thanks in advance.
|
|
|
|
|
Hey all,
I would like to know what is the best way of doing this. I just need the user to enter in some information, including their email address, and let the user's email that they enter in the text box be the address that the smtp function uses to send the message. This form is on our intranet, so it accesses our internal smtp server, which does not require authentication. I have some code that I think might work, but not sure what I should have set in my web.config to allow for something like this.
Any help would be great.
Thanks!
|
|
|
|
|
There is nothing you really need to set in your web.cofig that I can think of.
MailMessage.To = UserEmail.Text
only two letters away from being an asset
|
|
|
|
|
I had tried that line before, but got an error about the property 'to' being read only.
I eventually got it to work using this:
<br />
Dim Email As New System.Net.Mail.MailMessage( _<br />
txtEmail.Text, "test@test.com")<br />
Thanks for your help!
|
|
|
|
|
Further to my last post in here, I've been doing some playing around with various bits of ActiveX and all sorts of other things in an effort to get my app to print nicely rendered text when handed a bunch of HTML. I think I'm pretty close. I managed to get all the bugs I can see ironed out, but now I've got what's either silent failure or a different kind of success than I was expecting.
Bear with me while I try to explain what I've done, it's a little unconventional. To test with I've set up a page on which the page load event sends some HTML to my print routine. My print routine consists of a new class which inherits System.Windows.Forms.Form (I know, but bear with me). This class creates an ActiveX object (the MS DHTML editor control), passes the HTML string to it as its content, and then asks it to print. I found that, while there are all sorts of problems with printing without displaying the print dialog from a web browser control, the DHTML editor doesn't seem to mind and gives exactly the same result.
Anyway, after a lot of messing around with this (as you can imagine, including a windows form in an ASP.NET app caused me a little confusion), I've got to the point where I can load my page, and no errors arise, but I don't get anything out of the printer either. The ActiveX control is being called fine, there are no errors there, but the printout just doesn't arrive. The app has identity impersonate set to true, so I figured it would use the logged on user's default printer, but that doesn't seem to be the case. My next thought was that it might be using the aspnet process's default printer, if such a creature exists, but I don't know how to test for that.
Anyone have any ideas on how to resolve this? I feel like I'm really, really close and just need a bit of a nudge.
|
|
|
|
|
If it helps at all, I can now discount the notion that it's going to the wrong printer. I set the default printer programmatically and it still doesn't print anything. Any help would be appreciated, particularly from those of you more familiar with COM and ActiveX than I am.
|
|
|
|
|
Hello,
I have converted a VS 2003 project that has few Crsytalreports in
it to VS 2005. All the dlls got converted well and my application works well except the
Crystalreports part. I have a sub routine called ExportReport() in a
page called GenerateReport.aspx page. It works fine under VS 2003 which generates the
report in a word or excel etc... based on what user selects. But surprisingly it doesn't work in VS 2005.
The first line I have in ExportReport() sub routine is
Dim myReport as new CrystalReport1
and this works (I mean the I see the CrystalReport1 in the intellisense when I type the "new" key word) perfect in VS 2003. But it doesn't do the same thing in the converted VS 2005 project and I see a blue line underneath.
So as a work around I also tried adding
CrystalDecisions.CrystalReports.Engine
CrystalDecesions.ReportSource
CrystalDecisions.Shared
CrystalDecisions.Web
references to to my VS 2005 project by right clicking on the project
and by picking the "Add Reference...". option but it doesn't seem
like it hasn't done any thing for me and the IDE (intellisense) still doesn't recognise"CrystalReport1" in my VS
2005.
Have any one run into this kind of conversion from VS 2003 to VS 2005?
Please advice.
Thanks in advance,
-L
|
|
|
|
|
VS2003:Dim myReport as new CrystalReport1
VS2005:Dim myReport as new reportdocument
myreport.Load(Server.MapPath("CrystalReport1.rpt"))
VS2005 has excel export and word export etc.
|
|
|
|
|
Hi Daisy,
Thanks for the reply. Yes your code helped me to move further and I don't see any compile time errors. But at the line
'myReport.Load()
myReport.Load(Server.MapPath("ParishPartIEarlyChildhoodGrade8Report.rpt"))
I am getting an "access denied" exception ... here is the error I am getting
************************************************************************************
?ex
{"Load report failed."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: Nothing
InnerException: {"Access is denied.
"}
Message: "Load report failed."
Source: "CrystalDecisions.CrystalReports.Engine"
StackTrace: " at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at AODOnline.ParishForms301.ParishPartIEarlyChildhoodGrade8Export.ExportReport() in D:\AODSetup\ParishForms301\ParishPartIEarlyChildhoodGrade8Export.aspx.vb:line 147"
TargetSite: {System.Reflection.RuntimeMethodInfo}
************************************************************************************
I also did run CRRedist2005_x86.msi from the location "D:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports" . I am not sure I should run it on my development box but I did still I get the same access denied exception.
Any inputs on this?
Thanks,
-L
|
|
|
|
|
|
by right clicking the login control we can select smart tag . In that we can apply security settings On different users and also on folders. Can we also do that programmatically without using that wizard.
thanks in advance.
|
|
|
|
|
By programatically do you mean at runtime? You can make the settings manually in the web.config, which is how the Website Configuration utility works.
only two letters away from being an asset
|
|
|
|
|
can you please send me the codings. We dont want to do it manually but want the admin to do it through a form .
|
|
|
|
|
Hi All,
I have a search technique in my page. I use asp.net with vb.net and use access database. My following query does not pack record.
Select cust_order_ship.VAT, cust_order_ship.TAX from cust_order_ship, cust_order where cust_order_ship.order_id = cust_order.order_id and cust_order.order_date >=#11/05/2007# and cust_order.order_date <=#13/05/2007#
while record exist on Date 12/05/2007.
When I give Date start and end date 12/05/07, then it does work.
What can be the problem .
Can any one help me
Thanks in Advance.
|
|
|
|
|
This is just a guess, but I think a end date of 13/05/2007 is not valid.
I would try 12/05/2007
Ben
|
|
|
|