|
Is there a way to find out programatically from where the user landed on an aspx page. For instance, a link on another site, or by directly keying in the url in the address bar, etc.
|
|
|
|
|
Yes, it's Request.UrlReferrer, from memory.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hello everyone,
Im running a dynamic site where I'm using MS access as the DB. I'm having difficulty doing the search for the site. I have looked at couple of codes here and there but they all seem to be for static websites, at least to me it seems that way. If you guys have any suggestions on what to do or where to look at.
Any kind of help would greatly be appreciated. Oh and also, I'm pretty new to Asp.net so if I sound like a NEWBie thats because I am one.
Thanks everyone,
Dulla
|
|
|
|
|
dullar wrote: I'm having difficulty doing the search for the site.
You'll have to a little more specific. What are you having difficulties with, the code, getting results???
dullar wrote: dynamic site where I'm using MS access as the DB
That's your first mistake. Use SQL Server. SQL Express is free and far more capable than Access for this type of appliction.
only two letters away from being an asset
|
|
|
|
|
Yea I'm having trouble with the code. I don't know where to start as far as the search capabilities. I want a very basic way to do it and am not looking for something very fancy with highlights and stuff. I want it to search the Database and look for the word thats being searched. I don't even want it to search any other pages just the database.
I have used some of the code thats on this site but I get so many errors that it drives me nuts.
I should have used SQL Server but its too late because I have put in way too much time in doing it in Access.
Thanks!
|
|
|
|
|
As Christian points out, you should take a few steps back, you are quite apparently over your head.
only two letters away from being an asset
|
|
|
|
|
dullar wrote: Oh and also, I'm pretty new to Asp.net so if I sound like a NEWBie thats because I am one.
Then you should perhaps take a step back and learn things at a reasonable pace, so you learn them properly, and well.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
I cant get the database to update properly. I have a template field in a gridview and there are labels, dropdowns, textboxes in the template field that are bound to fields in the database.
I was trying to use the dropdown to populate two fields "KRAKey" bound to the SelectedValue of the dropdown and "KRAName" would be bound to the dropdowns SelectedItem.Text and I was trying to use the RowUpdating Event of the gridview to populate the UpdateParameters of the datasource for that field.
=========== PROBLEMS =================================
A. The "KRAName" field will not update. It is supposed to update with the dropdown list.selectedItem.text value in the EditItemTemplate of the gridview, as you can see in the RowUpdating Event of the gridview.
B. This might be related to problem A... if there is already data in the field, the field will not update with the values im trying to set for the parameters in the RowUpdating Event in the gridview. It WILL, however, update if the current value in that field in the database is NULL. It also WILL update the value in the textbox field that is bound to the "KRADescription" field even if there is existing data in the field.
Can anyone see why this is not working, please?
Now, I will post the entire code.... I hope someone can figure out my problems, which I will state after the code. Thanks!
============= Gridview =================================
<br />
<EditItemTemplate><br />
<br />
<table style="width:100%;"><br />
<br />
<tr><br />
<br />
<td class="style1"><br />
<br />
<asp:DropDownList ID="drpETChooseKRA" runat="server" <br />
SelectedValue='<%# Bind("KRAKey") %>' AppendDataBoundItems="True"><br />
<br />
<asp:ListItem Selected="True" Value="-1">< Choose a KRA Level ></asp:ListItem><br />
<br />
<asp:ListItem Value="1.0">1.0 - Markets, Products and Services</asp:ListItem><br />
<br />
<asp:ListItem Value="3.0">3.0 - Resources</asp:ListItem><br />
<br />
<asp:ListItem Value="4.0">4.0 - Operational Systems</asp:ListItem><br />
<br />
<asp:ListItem Value="5.0">5.0 - Management Systems</asp:ListItem><br />
<br />
<asp:ListItem Value="6.0">6.0 - Culture</asp:ListItem><br />
<br />
<asp:ListItem Value="7.0">7.0 - Financial Management</asp:ListItem><br />
<br />
</asp:DropDownList><br />
<br />
<asp:Label ID="lblETKRAName" runat="server" Text='<%# Bind("KRAName") %>' <br />
style="color: #0000CC"></asp:Label><br />
<br />
<asp:Label ID="lblETPlanUID" runat="server" Text='<%# Bind("PlanUID") %>' <br />
style="color: #CC3300"></asp:Label><br />
<br />
</td><br />
<br />
<td class="style2"><br />
<br />
<asp:TextBox ID="txtETKRADescription" runat="server" Rows="4" TextMode="MultiLine" <br />
Width="250px" Text='<%# Bind("KRADescription") %>'></asp:TextBox><br />
<br />
</td><br />
<br />
<tr><td><br />
<br />
<asp:Label ID="lblETEditedBy" runat="server" Text='<%# Bind("EditedBy") %>' <br />
style="color: #006600"></asp:Label><br />
<br />
</td><td><br />
<br />
<asp:Label ID="lblETEditDate" runat="server" Text='<%# Bind("EditDate") %>' <br />
style="color: #FF6600"></asp:Label><br />
<br />
</td></tr> <br />
</tr> <br />
<br />
</table><br />
<br />
</EditItemTemplate><br />
<br />
<ItemStyle Wrap="False" /><br />
<br />
</asp:TemplateField><br />
<br />
<asp:BoundField DataField="PlanUID" HeaderText="PlanUID" <br />
SortExpression="PlanUID" Visible="False" /><br />
<br />
<asp:BoundField DataField="KRAUID" HeaderText="KRAUID" <br />
SortExpression="KRAUID" InsertVisible="False" ReadOnly="True" <br />
<br />
Visible="False" /><br />
<br />
<asp:ButtonField ButtonType="Button" CommandName="ViewObjectives" <br />
Text="View Objectives" /><br />
<br />
</Columns><br />
<br />
<HeaderStyle BackColor="#CCCCCC" /><br />
<br />
<AlternatingRowStyle BackColor="#FFFFCC" /><br />
<br />
</asp:GridView><br />
<br />
======== Datasource =================<br />
<br />
<asp:SqlDataSource ID="sdsKRAs" runat="server" <br />
<br />
UpdateCommand="UPDATE [tblKRAs] SET [KRAKey] = @KRAKey, [PlanUID] = @PlanUID, [KRAName] = @KRAName, [KRADescription] = @KRADescription, [EditedBy] = @EditedBy, [EditDate] = @EditDate WHERE [KRAUID] = @original_KRAUID"><br />
<br />
<UpdateParameters><br />
<br />
<asp:Parameter Name="KRAKey" Type="String" /><br />
<br />
<asp:Parameter Name="original_PlanUID" Type="Int32" /><br />
<br />
<asp:Parameter Name="KRAName" Type="String" /><br />
<br />
<asp:Parameter Name="KRADescription" Type="String" /><br />
<br />
<asp:Parameter Name="EditedBy" Type="String" /><br />
<br />
<asp:Parameter Name="EditDate" Type="DateTime" /><br />
<br />
<asp:Parameter Name="original_KRAUID" Type="Int32" /><br />
<br />
</UpdateParameters><br />
<br />
=============== Codebehind =======================<br />
<br />
Protected Sub gvKRAs_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvKRAs.RowUpdating <br />
Dim name, sql, pstring, KRAName, EditedBy, EditDate, username As String<br />
<br />
sdsKRAs.UpdateParameters("KRAName").DefaultValue = name <br />
sdsKRAs.UpdateParameters("EditedBy").DefaultValue = Session("username")<br />
<br />
username = Session("username")sdsKRAs.UpdateParameters("EditDate").DefaultValue = DateTime.Now <br />
<br />
<br />
KRAName = CType(gvKRAs.Rows(e.RowIndex).FindControl("lblETKRAName"), System.Web.UI.WebControls.Label).Text<br />
<br />
EditedBy = CType(gvKRAs.Rows(e.RowIndex).FindControl("lblETEditedBy"), System.Web.UI.WebControls.Label).TextEditDate = CType(gvKRAs.Rows(e.RowIndex).FindControl("lblETEditDate"), System.Web.UI.WebControls.Label).Text <br />
sql = sdsKRAs.UpdateCommand.ToString<br />
<br />
<br />
End Sub<br />
I would really appreciate the help!
Thanks
modified on Friday, June 5, 2009 12:45 PM
|
|
|
|
|
Can you please post only the relevent section. No one going to read out your whole post. Please post those section only which you think can cause the problem.
Thank you !
|
|
|
|
|
I removed a lot of the sections that were not needed... however, I left a good chunk simply because I want people to be able to see the datasource UpdateCommand, parameters, etc. and how I did the gridview...
Hope thats ok... any help would be appreciated!
thanks
|
|
|
|
|
can someone give me some help with this, please?
thanks
|
|
|
|
|
Windows 2003 64 bit IIS Manager - ASP.NET tab missing
I tried:
Stop IIS using iisreset /stop
Open the file C:\WINDOWS\system32\inetsrv\MetaBase.xml in Notepad.
Find and delete the line that says Enable32BitAppOnWin64="TRUE"
Restart IIS using iisreset /start
aspnet_regiis -i
No luck and ASPX won't run!?
aspnet_iisreg -lv lists version on IIS and it's there though, not sure why ASPNET tab missing AND ASPX don't run (assembly load failed)
http://www.gigajoule.net/wp/[^]
http://jamesmckay.net/2008/01/missing-aspnet-tab-in-iis-on-windows-server-2003/[^]
dev
|
|
|
|
|
in fact, when I
aspnet_regiis /u or /i
I get
"The error indicates that IIS is in 64 bit mode, while this application is a 32bit application and thus not compatible."
dev
|
|
|
|
|
try this[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Which Framework Version did you installed ? Did you installed .NET Framework version of 64 Bit or 32 Bit?
|
|
|
|
|
fixed it thanks!
you know what? It was two versions of "aspnet_regiis" under $SYSTEM$, one under 32bit folder, the other 64bit and we were trying to get ASP.NET registered with the version under 32bit! - if you run aspnet_regiis under 64bit dir (under $SYSTEM$) then restart IIS you should be fine!
dev
modified on Friday, June 5, 2009 2:26 PM
|
|
|
|
|
Exception Details: System.Web.HttpException: Request timed out.
I am using ReportViewer control.I have only problem in Exporting in PDF format.
I have made setting in web.config like
httpRuntime executionTimeout="900" in system.web tag
Also I have checked many attributes like sessionState,httpRuntime in web.config file.And also checked values for server.Scripttimeout.But i getting same error
modified on Tuesday, June 9, 2009 2:21 AM
|
|
|
|
|
Hi,
I'm using ASP.NET with C# and SQL. I have a BLL and DAL set up for interaction with SQL. I have a user input webform with a link button. I need the link button to post the input to the database and pass the new identity value on to the page it navigates to. Can someone please help me on the code for this? This is what I have so far:
protected void LinkButton1_Click(object sender, EventArgs e)
{
ObjectDastaSource1.InsertParameters["Name"].DefaultValue=(FindControl("txtName") as Textbox).Text;
ObjectDataSource1.InsertParameters["User"].DefaultValue=(FindControl("ddlUser")as DropDownList).SelectedItem.Text;
ObjectDataSource1.InsertParameters["Email"].DefaultValue=(FindControl("txtEmail")as Textbox).Text;
ObjectDataSource1.InsertParameters["Start"].DefaultValue=(FindControl("cStart") as Calendar).SelectedDate.ToShortDateString();
ObjectDataSource1.Insertparameters["End"].DefaultValue=(FindControl("cEnd") as Calendar).SelectedDate.ToShortDateString();
ObjectDataSource.DataBind();
|
|
|
|
|
Hi
How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net
Thanks
Denny
|
|
|
|
|
Read the image in a byte[] and assign it to the session variable.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
As manash sugguested you can store image as byte array in the session variable. But why you are storing image in session variable ? Did you thing about size of session variable?
|
|
|
|
|
Hi,
Rather than storing Image in Session variable donot u think it is good to store the image path in Session.try this way....
|
|
|
|
|
Hello,
I am trying to send email from Microsoft outlook from my application, and I wrote following code :
string stSubject="";
string stTo="";
string stCC="";
string stAttachmentFileName = "";
string stDisplayName = "";
string stBody = "";
ApplicationClass oApplicationClass = new ApplicationClass();
NameSpace oNS = null;
MailItem oMailItem= (MailItem)oApplicationClass.CreateItem(OlItemType.olMailItem);
//stSubject is the mail subject
oMailItem.Subject = stSubject;
//stTo is the email to address
// oMailItem.From = "m.r.chavan@amc.nl";
oMailItem.To = "aa@aa.nl";
oMailItem.CC = "bb@bb.nl";
oMailItem.BodyFormat = OlBodyFormat.olFormatHTML;
//if you want it in the plain format, you can set body format as oMailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
oMailItem.HTMLBody = stBody;
//oMailItem.Attachments.Add(stAttachmentFileName,(int)OlAttachmentType.olByValue,stBody.Length+1,stDisplayName);
oMailItem.Display(true);
Can anybody tell me how can i set the oMailItem.From in the mail, I know that the outlook is taking the default user account for mailing, but can I set the FROM property ?
|
|
|
|
|
You should system.net.mail to send mail from server code in asp.net.
I doubt very much you can mail from a clients machine.
I didn't get any requirements for the signature
|
|
|
|
|
milindchavan12 wrote: I am trying to send email from Microsoft outlook from my application,
What does it mean?
You want to send mail from ASP.NET Application? Did you googled for that?
milindchavan12 wrote: Can anybody tell me how can i set the oMailItem.From in the mail, I know that the outlook is taking the default user account for mailing, but can I set the FROM property ?
Why? what happend when you set the From property of MailMessage object?
|
|
|
|