|
good day
i have 2 sites hosted on the SAME server . the two sites are asp.net 2.0 apps. the first site delivers aspx files on requested, but the second site gives the error "Server Error in / Application" when aspx is requested.
pls help solve this problem.
it is urgent.
|
|
|
|
|
Check the event viewer to find error occured.
Omage femi wrote: it is urgent.
Is it? Read this[^]
|
|
|
|
|
thanks navaneeth,
the 2 sites are public domains hosted on the internet
i dont have access to the event viewer. and the asp.net 2.0 app was written in vb.
|
|
|
|
|
Omage femi wrote: the 2 sites are public domains hosted on the internet
You can contact your hosting provider and get the details.
|
|
|
|
|
I want to have current querystring values in HyperLinkField of a Gridview. For example i have a list of employees page with department id already in the querystring, now i want to have View Details link to take user to employee details page with employee_id added to querystring but also keep department_id in the querystring. Like following code
<asp:HyperLinkField DataNavigateUrlFields="employee_id, <%= Request.Querystring["department_id"] %>"
DataNavigateUrlFormatString="employee_details.aspx?employee_id={0}&department_id{1}" HeaderText="Action" Text="View Details" />
The current code gives me following error message.
Parser Error Message: Literal content ('<asp:HyperLinkField DataNavigateUrlFields="candidate_id,') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'.
I hope there is some other way i can achieve this functionality while keeping it declarative as possible without using code behind.
Thanks
Humayun Shabbir Bhutta
http://www.sourcesystems.net
http://sourcesystems.net/humayun
|
|
|
|
|
hi,try this
<asp:hyperlink id="hlUsage" runat="server" navigateurl="<%# " ~="" admin="" agentusage?id=" & Request.QueryString(" id")="" %>view="" <="" asp:hyperlink>="" xml>"="" xmlns:asp="#unknown">
|
|
|
|
|
Hi, i was also able to resolve this problem by converting the field to template using following code. And without going to codebehind
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# Eval("employee_id", "employee_details.aspx?cid={0}&department_id=" + Request.QueryString["department_id"]) %>'
Text="View Details"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
Humayun Shabbir Bhutta
http://www.sourcesystems.net
http://sourcesystems.net/humayun
|
|
|
|
|
It work out best for me by set the gridView at runtime...
protected void Page_Load(object sender, EventArgs e)
{
grid1.Visible = true;
setGridValues();
}
private void setGridValues()
{
grid1.Visible = true;
grid1.AutoGenerateColumns = true;
DataTable dt = new DataTable(); // dataTable
// column names ...
dt.Columns.Add("ID");
dt.Columns.Add("DateRequested");
dt.Columns.Add("ServicePartNo");
dt.Columns.Add("qty.");
dt.Columns.Add("VIN");
dt.Columns.Add("RoNo");
dt.Columns.Add("GCQIS");
dt.Columns.Add("Status");
// add hyper link to add to grid1........................
HyperLinkField linkX = new HyperLinkField();
string[] fldS = { "ID","Status" };
linkX.HeaderText = "ReqID";
linkX.DataTextField = "ID";
linkX.DataNavigateUrlFields = fldS;
linkX.DataNavigateUrlFormatString = "summaryReqNo.aspx?reqNo={0}&status={1}";
linkX.Target = "_self"; // = "_blank"
grid1.Attributes.Add("BackColor", "#CCCCCC"); // add attributes to grid
grid1.Attributes.Add( "BorderColor", "#000099");
grid1.Attributes.Add("BorderWidth", "3px");
grid1.Attributes.Add("ForeColor","#333399");
grid1.Attributes.Add("Width", "7in");
grid1.Columns.Add(linkX); // adding hyper link devined above to grid
cRequests reqS = new cRequests(userX); // values from classto loade into grid
// adding rows to grid1 ......................................
foreach (cRequest item in reqS)
{
object[] aryX = new object[8];
aryX[0] = (item.reqID);
aryX[1] = (item.reqDate).Value.ToShortDateString();
aryX[2] = (svcPN.prefix) + "-" + (svcPN.basePart) + "-" + (svcPN.suffix);
aryX[3] = (svcPN.svcQty);
aryX[4] = (item.reqVIN);
aryX[5] = (item.reqOrdNo);
aryX[6] = (item.reqGCQISNo);
aryX[7] = item.status;
dt.Rows.Add(aryX);
}
grid1.DataSource = dt;
grid1.DataBind(); // gridX.DataSource = arryLstX;
}
I hopes this helps. Thanks, Signed Lindall
xxx
|
|
|
|
|
Hi,
I have 5 text boxes on my form and I need to add another text box when I click add new button on the form similar to adding a new experience or educational detail in jobsites. Can anyone suggest best way to do it.
thanks
Uday
|
|
|
|
|
Use GridView/DataGrid where textboxes are placed in a template column. For adding new rows, add new rows to the datasource and rebind grid. This is the easiest method and you won't get any viewstate issues.
|
|
|
|
|
Create an instance of TextBox and add it to Page's controls collection do it in your button's event
|
|
|
|
|
But you will end up with viewstate issues.
|
|
|
|
|
yeah he has to handle viewstate explicitly
|
|
|
|
|
txtBx1 = New TextBox()
txtBx1.ID = "TextBox1"
txtBx1.Style("Position") = "Absolute"
txtBx1.Style("Top") = "755px"
txtBx1.Style("Left") = "96px"
Form1.Controls.Add(TextBox1) //
InitializeComponent()
// this is an example on in a table into a placeHolder
// go can do the same with the above
private HtmlTable insertTblASP( PlaceHolder placeX)
{
HtmlTable tblx = new HtmlTable();
placeX.Controls.Add(tblx);
return tblx;
}
I hopes this helps. Signed... Linda
xxx
|
|
|
|
|
Can any one pl tell me how to implement the Site Search n Google Search functionality on the Website. As is is very commonly seen,wid a Textbox to hold Search item,then RadioButton to Choose between Google and MYSITE,and then a Search Button..
I am using Visual Studio2005.Please explain it in a bit detail as i m new to this field...
thanx a lot...
|
|
|
|
|
amit2011 wrote: explain it in a bit detail
How about explaining what you have done so far?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi,
Currently I am calling web methods exposed by our vendor and directly get the result. Is there any way I can access the actual soap XML used in this transaction??
I want to get those XML through application so that I can same request/response XML to our database for each transaction.
This functionality sounds very basic and simple for it be not available through default framework classes, but I am unable to find any way for last couple of days.
Any suggestions?????
Thanks.
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Are there any gotchas when developing an ASP.NET 2.0 website under Vista IIS7 but deploying it to Windows Server 2003 IIS6?
Todd Smith
|
|
|
|
|
The only issue I've come across is the way custom httphandlers are handled and written in web.comfig. Otherwise, I've been writing/deploying under this scenario for a while now without any problems.
|
|
|
|
|
Hello friends,
I want to print reports in in asp.net 2.0. I am using report viewer (rdlc) to print reports. But I have to export a report in Excel or PDF to print. Is it possible to print a report directly, by pressing single button? (without exporting)
|
|
|
|
|
Hey
When a gridview uses templated columns and doesnt show all the data available to it eg:
a datasource requests itemId, itemName, itemCost, itemDescription, itemQuantity
but the gridview only shows itemName, itemCost, itemDescription.
Is all the data sent client side or is only the relevant itemName, itemCost, itemDescription
sent?
Thanks
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
The columns which you are binding will be sent.
|
|
|
|
|
Hey
Thanks very much
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem.
Basically, 3 folders below the website project fail to publish properly. When the PrecompiledWeb is transferred to the host these three folders have to be manually copied from the Visual Studio project (i.e. they are no longer the published versions) to the host for it to work.
If the results of the publish operation are left, any page in the folder results in the following error:
Server Error in '/' Application.
Unable to cast object of type 'System.Web.Compilation.BuildResultNoCompilePage' to
type 'System.Web.Compilation.BuildResultCompiledType'.
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.
Exception Details: System.InvalidCastException: Unable to cast object of
type 'System.Web.Compilation.BuildResultNoCompilePage' to
type 'System.Web.Compilation.BuildResultCompiledType'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information
regarding the origin and location of the exception can be identified using the exception stack trace
below.
Stack Trace:
[InvalidCastException: Unable to cast object of
type 'System.Web.Compilation.BuildResultNoCompilePage' to
type 'System.Web.Compilation.BuildResultCompiledType'.]
System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath virtualPath, String inputFile,
HttpContext context) +254
System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile,
HttpContext context) +171
URLRewrite.URLRewriter.ProcessRequest(HttpContext context) +2183
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +405
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Does anyone have any idea what the possible causes of these pages not publishing correctly could be? Anything I can look at that may indicate the root of the problem?
|
|
|
|
|
im trying to implement forms authentication on a website i have created.
My problem is whenever i want to go to another page(after loggin in) im redirected to the first page/the login page. does anyone know what wrong
Here is my code for the sessions,
void Login_Click(Object sender, EventArgs E)
{
if ((UserEmail.Text == "username@domain.com") &;
(UserPass.Text == "password"))
{
FormsAuthentication.RedirectFromLoginPage (tboUsername.Text,PersistCookie.Checked);
}
//else
//{
// lblResults.Text = "Invalid Credentials: Please try again";
//}
}
and my config fileha sthe following lines
<authentication mode="Forms">
<forms name=".COOKIEDEMO">
loginUrl="frmMain.aspx"
protection="All"
timeout="30"
path="/"/>;
;
<authorization>
<deny users="?">
;
|
|
|
|