|
Absolutely no. The exportation occurs in the app server so I mean your server needs to have Excel installed.
|
|
|
|
|
I have an error page set up and when an error occurs the page is not shown.
From my webconfig file:
<customErrors defaultRedirect="~/Error.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="~/Error.aspx" />
<error statusCode="500" redirect="~/Error.aspx" />
</customErrors>
From my Global aspx file:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception = Server.GetLastError().GetBaseException()
Try
If Not System.Diagnostics.EventLog.SourceExists(".NET Runtime") Then
System.Diagnostics.EventLog.CreateEventSource(".NET Runtime", "Application")
End If
Dim log As New System.Diagnostics.EventLog()
log.Source = ".NET Runtime"
log.WriteEntry([String].Format(vbCr & vbLf & vbCr & vbLf & "Application Error" & vbCr & vbLf & vbCr & vbLf + "MESSAGE: {0}" &
vbCr & vbLf + "SOURCE: {1}" & vbCr & vbLf + "FORM: {2}" & vbCr & vbLf + "QUERYSTRING: {3}" &
vbCr & vbLf + "TARGETSITE: {4}" & vbCr & vbLf + "STACKTRACE: {5}" & vbCr
& vbLf, ex.Message, ex.Source, Request.Form.ToString(), Request.QueryString.ToString(), ex.TargetSite, _
ex.StackTrace), System.Diagnostics.EventLogEntryType.[Error])
Server.ClearError()
Catch
Server.ClearError()
End Try
Server.ClearError()
Response.Redirect(String.Format("Error.aspx?aspxerrorpath={0}", Request.Url.PathAndQuery))
End Sub
What I end up seeing is the master page and the URL shows / Error.aspx, but the error page is not shown with it.
|
|
|
|
|
It seems that everything is fine but the address of Error.aspx is wrong as you say 'master page and the URL shows / Error.aspx'. I guess you must work on the last line:
Response.Redirect(String.Format("Error.aspx?aspxerrorpath={0}", Request.Url.PathAndQuery))
maybe you must replace it with "~/Error.aspx..."
|
|
|
|
|
How to do impersonation programatically in vb.net to access Windows Task scheduler's job status?
|
|
|
|
|
How to post in the correct forum.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Can't do it in asp.net, because asp.net for web applications will not let you access the windows operating system, as a level of protection.
You would have to write a dll for windows, and call the dll using asp.net.
|
|
|
|
|
I created ASP.NET webservice in VS2010 with 2 simple methods: I can test it locally(IP= 192.168.1.104) with http://localhost:4070/Service1.asmx, The localhost = 127.0.0.1 and not the local IP.
I go to my other machine on my network, I type in
192.168.1.104:4070/Service1.asmx to try to get at the webservice, and I get the error could not connect to '192.168.1.104:4070'. Am I doing this wrong? How do I get At my Localhost's webservice?
Thanks for your help, I am stuck with this!
modified 3-Apr-12 23:18pm.
|
|
|
|
|
The "web service" must be configured to allow connections from different computers. Also check the firewall.
|
|
|
|
|
Firewall is okay, do yuo have an idea how to configure the webservice part?
|
|
|
|
|
That depends on how the service is hosted - IIS or the "web server" of Visual Studio.
|
|
|
|
|
- I originally wanted to host it on VS, I didn't know how to do it. So, I skipped.
- I tried to host it on IIS7, I get it partially working. It lists the methods on the remote PC, but doesn't do anything, it says you can test methods only locally.
So, if my "Testwebservice" has a
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
localhost/Testwebservice will allow me to test this function and prints "Hello World" to webpage.
On remote PC, I can get to the webservice page that lists the webmethods, but can't test it. What I really need is to be able to read the contents/results of the webservice ie. "Hello World!" from any app on remote PC. How do I do that when I can get the page to display on remotePC?
Thanks again
modified 4-Apr-12 14:52pm.
|
|
|
|
|
How do you find the services on the Remote machine? Do You use add web reference in VS and then find services by a full address including IP and service name? Let me know about your method.
|
|
|
|
|
The webdev is restricted to the local computer only, you have to setup your default web site using IIS on the local computer to allow access to the entire subnet the computer is on. So if your computer is on 192.168.1, then computers on 192.168.1 can access the page.
|
|
|
|
|
Hi,
I have a notification checkbox and an email textbox. I have to validate email checkbox so that it should not be empty and has a valid email then only notfication checkbox should be enabled or it should throw an error message to fill email to make this checkbox selectable etc.
Can anybody please help me in resolving this, any help or any kind of link would be very helpfull.
Thanks,
Abdul
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Here[^] you are
Bastard Programmer from Hell
|
|
|
|
|
Hi,I have a asp menu which have dynamic genrated first and second level nodes in it. now if i click on first level node then it shows the 2nd level node. then i select my second level node.. so then how can i acess selectedvalue for 2nd level nodes.?? any solution??
i treid menuitem_click() event but it gives me only firstlevel node selected value..
|
|
|
|
|
Hi,
Anyone knows about a payment gateway for the Middle East region (Bahrain) which will work with ASP.NET and allow to have customized payment form?
Thanks,
Jassim
|
|
|
|
|
Hi,
Is it possible to use the Paypal standared account in ASP but with a customized payment form using ASP.NET itself or some third party integrator so user won't see any form except my payment form?
Thanks,
Jassim
|
|
|
|
|
I think you have to use Paypal Pro NVP (named value pair) or XML. The Basic Paypal is CIM, and requires you to preload a remote form, and get the values back when redirecting back to your website.
NVP is just named value pairs AIM eg. FirstName=Joe, CC_Number=9999 9999 9999 9999,
and is pretty simple to write code for, then you just transmit your NVD to paypal and parse the response back, using your form and code.
|
|
|
|
|
I am from Middle East but the Pro is available for US only? am I right?
|
|
|
|
|
Well since paypal deposits money into a pay pal account, and not your middle east checking account, then I don't see why you can't use it in the middle east, unless it's an issue with your countries currency, such as the rial for example.
Pro is $30 USD a month, plus fee's.
When it comes to code, there all pretty much the same. You package, transmit, receive and parse, then store the results. The hard part is creating the user interface in a manner that is easy to use.
Call em, or post a message in the paypal forum.
|
|
|
|
|
but it is not available for international users?
|
|
|
|
|
I have a gridview created on a page where I want to provide an edit button for the user to click in. However the issue is the grid view row becomes editable only while clicking the edit button second time. Not sure what is going wrong here, any help would be appreciated.
One additional point is my grid view is displayed on the page only on a click of a button and is not there on page_load event hence.
Posting the code snippets:
//MY Aspx code
<asp:GridView ID="GridView1" AllowPaging="True" BackColor="#f1f1f1" AutoGenerateColumns="false"
Style="z-index: 101; left: 30px; position: absolute; top: 300px"
Font-Size="Large" Font-Names="Verdana" runat="server" GridLines="None" OnRowEditing = "GridView1_RowEditing" OnRowCancelingEdit = "GridView1_CancelingEdit" OnRowUpdating = "GridView1_RowUpdating"
BorderStyle="Outset" OnRowUpdated = "GridView1_RowUpdated" AllowSorting="false">
<RowStyle BackColor="Gainsboro" />
<AlternatingRowStyle BackColor="White" />
<HeaderStyle BackColor="#0083C1" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="Slice" SortExpression="name">
<ItemTemplate>
<asp:Label ID="lblslice" Text='<%# Eval("slice") %>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblslice" Text='<%# Eval("slice") %>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Metric" SortExpression="Description">
<ItemTemplate>
<asp:Label ID="lblmetric" Text='<%# Eval("metric")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblmetric" Text='<%# Eval("metric")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Original" SortExpression="Type">
<ItemTemplate>
<asp:Label ID="lbloriginal" Text='<%# Eval("Original")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lbloriginal" Text='<%# Eval("Original")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WOW" SortExpression="Market">
<ItemTemplate>
<asp:Label ID="lblwow" Text='<%# Eval("WOW")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblwow" Text='<%# Eval("WOW")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Change" SortExpression="Market" >
<ItemTemplate>
<asp:Label ID="lblChange" Text='<%# Eval("Change")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtCustomerID" Text='<%# Eval("Change") %> ' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowEditButton="True" />
</Columns>
</asp:GridView>
My code behind:
protected void Page_Load(object sender, EventArgs e)
{
}
public void populagridview1(string slice,string fromdate,string todate,string year)
{
SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "usp_geteventchanges";
cmd.Connection = conn;
conn.Open();
SqlParameter param1 = new SqlParameter("@slice", slice);
cmd.Parameters.Add(param1);
SqlParameter param2 = new SqlParameter("@fromdate", fromdate);
cmd.Parameters.Add(param2);
SqlParameter param3 = new SqlParameter("@todate", todate);
cmd.Parameters.Add(param3);
SqlParameter param4 = new SqlParameter("@year", year);
cmd.Parameters.Add(param4);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds, "Table");
GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();
}
protected void ImpactCalc(object sender, EventArgs e)
{
populagridview1(ddl_slice.SelectedValue, dt_to_integer(Picker1.Text), dt_to_integer(Picker2.Text), Txt_Year.Text);
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
gvEditIndex = e.NewEditIndex;
Gridview1.DataBind();
}
[My page layout]
This edit screen appears after clicking edit twice.. the grid view gets displayed on hitting the Calculate impact button. The data is from a backend stored procedure which is fired on clicking the Calculate impact button
|
|
|
|
|
Below is my code where I am trying to delere row in session based on criteria. However it's not working. Please help
For Each myRow As DataRow In HttpContext.Current.Session("myConfiguration").PlanRates.Rows
If myRow.RowState <> DataRowState.Deleted Then
If myRow.Item("Term") = myDataKey(0).Trim And _
myRow.Item("AgeGroup") = myDataKey(1).Trim And _
myRow.Item("Coord") = myDataKey(2).Trim Then
Dim myDataRow() As DataRow = HttpContext.Current.Session("myConfiguration").PlanRates.Select("Term='" & myDataKey(0).Trim & "' AND Coord='" & myDataKey(2).Trim & "' AND AgeGroup='" & myDataKey(1).Trim & "'")
Exit For
End If
End If
Next
modified 3-Apr-12 8:13am.
|
|
|
|