|
Thanks ......Its working.
N.K.Basak
|
|
|
|
|
Hello!
I have developed a website project in visual studio express 2005 (.net framework 2.0) and sql server express 2005. Now I am trying to run this project in visual team studio 2008 (.net framework 3.5) and sql server 2005 but it's showing below error when I'm trying to run that project:
it is giveing error like this..
Line 161:
Line 162: <provider>
Line 163: <add name="OracleSiteMapProvider" type="Oracle.Web.SiteMap.OracleSiteMapProvider, Oracle.Web, Version=2.111.5.10, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString"; applicationName=""; securityTrimmingEnabled="true"/>;
Line 164: </provider>
Line 165:
|
|
|
|
|
If this script have not content just delete it. Maybe error will be cut with it.
No more Mister Nice Guy... >: |
|
|
|
|
|
Something is wrong from the config file. I am not sure if the error you pasted in is accurate or not but it seems to indicate a stray semi-colon.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi,
I have aspx and i have few ascx within the same aspx. I want to use a page variable for it so it should be readable from any part of the page, from aspx or any of its ascx, something like the session but for that page only.
what's your idea?
|
|
|
|
|
VieState or ControlState plus some helper class. I don't see other alternatives. Maybe custom Page class with custom Controls, but it is harder to acomplish.
No more Mister Nice Guy... >: |
|
|
|
|
|
Create an object for MyPage class like
MyPage myPage = new MyPage();
myPage.productName = "adidos";
productName is a variable of your page
|
|
|
|
|
I'm experimenting with the httpModule, using XP and IIS5.1, asp.net 4.0, in which I want to take a file called display.aspx?pNp=XXXX and turn it into a file name XXXX.aspx.
So I wrote the first part, I know what context.Items("originalUrl") is for, but I'm not sure if I actually need it, because I don't don't have the second part written or working yet. It's been awhile since my last 3 failures at attempting this.
I'd like to get another set of eyes on my code, before I procede, in case I really blew it here. And see if there are any mistakes.
It seems to work, and I get the error message below, so I figure it's ok.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /EN-US/part-lookup/catagory/XXXX.aspx
Imports Microsoft.VisualBasic
Public Class http_module_Details
Implements IHttpModule
Public Sub Init(context As System.Web.HttpApplication) Implements System.Web.IHttpModule.Init
AddHandler context.BeginRequest, AddressOf context_BeginRequest
AddHandler context.PreRequestHandlerExecute, AddressOf context_PreRequestHandlerExecute
AddHandler context.EndRequest, AddressOf context_EndRequest
End Sub
Private Sub context_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
Dim application As HttpApplication = DirectCast(sender, HttpApplication)
Dim context As HttpContext = application.Context
If Not context.Items("originalUrl") Is Nothing Then
context.RewritePath(Convert.ToString(context.Items("originalUrl")))
End If
End Sub
Private Sub context_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim application As HttpApplication = DirectCast(sender, HttpApplication)
Dim context As HttpContext = application.Context
If (context.Request.RawUrl.ToLower.Contains("details.aspx")) Then
context.Items("originalUrl") = context.Request.RawUrl
End If
Dim originalPath As String = context.Request.Url.ToString()
If Not context.Request.QueryString("pNp") Is Nothing Then
Dim cP As String = context.Request.ServerVariables("SCRIPT_NAME")
cP = cP.Replace("Details.aspx", "").Replace("details.aspx", "")
Dim pn_P As String = HttpUtility.UrlDecode(context.Request.QueryString("pNp"))
Dim scriptName As String = cP & pn_P & ".aspx"
context.RewritePath(scriptName)
End If
End Sub
Private Sub context_EndRequest(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Public Sub Dispose() Implements System.Web.IHttpModule.Dispose
End Sub
End Class
|
|
|
|
|
Hello all,
I am creating a point of sale application but I have an issue that I have a page in which I want to show the Product Items and on the same page I want to display the cart.I have done this by using the frame set but the issue is whenever I have added a new item it doesn't show on a cart untill I refresh the whole page.I think I have to use update panel through AJAX.But how could I apply this or any other solution could any one suggest please help me.
|
|
|
|
|
That how it works. The page has to send a request to the server to get new HTML that represents the current data stored.
The update panel just puts round trips to the server into a smaller container, so your still doing a postback, but just a partial page postback. The update panels works fine in developement, but in production mode, as you get farther away from the server in distance (4K miles away), the speed slows down, and the page gets jerky and stutters. The update panels is sensitive to data changes, with the exception of the textbox and dropdown box selected values, in which it has security features that do not accept changes. So if the server sent one thing, and another posted back, a security exception will be thrown.
You would have to use Javascript and a webservice, in which the client keeps polling for cart data, and the javascript updates the cart container, or have some type of trigger that fires off the process.
Or just change the user experience, by sending them to a confirmation page, and then send then back to the origin page. When they come back, everything is updated.
|
|
|
|
|
Hi,
I'm trying to connect to this Remote Web Service
http://217.52.114.3/kannelsending/service.asmx?op=SendSMS[^]
When I try it manually, it works, I have a username and password.
But it displays this error:
The remote server returned an error: (500) Internal Server Error.
...at this line.
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
Do I need to encrypt the parameters or what? I'm kinda new to webservices...
Am I missing something..can someone post an example to try out?
Thanks.
|
|
|
|
|
Normally, you'd generate a set of service proxy classes to handle the communication to the server. Working at the Http level/rolling your own messages is normally tiresome and needless, thankfully there is a wsdl defining the service you want to use.
I'd suggest running wsdl.exe against http://217.52.114.3/kannelsending/service.asmx?WSDL[^], this will generate a set of proxy classes you can consume in your code.
You can also add a reference to the web service by right-clicking the project --> add service reference and using http://217.52.114.3/kannelsending/service.asmx as the service address. Don't know how well it works with external IPs, and if anything changes with the external service, it could break your code.
Refs here:
http://msdn.microsoft.com/en-us/library/ms155134.aspx[^]
|
|
|
|
|
What version of .NET framework are you using? If you are using v4.0 you can add a service reference which would make it simple or you can search the .ServiceModel for easy tools.
|
|
|
|
|
[Edit]
I went to your link, and the typical methods for accessing the web service came up.
The last example is probably what your looking for.
You'll probably have to debug the web service to see if the query strings are taken first, and make adjustments. Just load the web service file, and press F9 to mark a spot to stop at and press F5.
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /kannelsending/service.asmx/SendSMS HTTP/1.1
Host: 217.52.114.3
Content-Type: application/x-www-form-urlencoded
Content-Length: length
service.asmx?UserName=string&Password=string&SMSText=string&SMSLang=string&SMSSender=string&SMSReceiver=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<int xmlns="http://tempuri.org/">int
modified 4-Nov-12 1:30am.
|
|
|
|
|
actually i am developing a web application ..in that web application i have lot of label controls ,buttons and textbox placed in the top of the page.in the bottom of the page i placed a gridview control..when i click the view button the top of the controls like textbox and labels will be disabled and gridview is placed at the top of the page..but for the gridview is displayed bottom page only...can anyone help me how to view the gridview control in the top of the page....thanks in advance
|
|
|
|
|
Do you want to hide the controls and show the grid view.
Or You want to show the grid view as the popup window.
|
|
|
|
|
i have a lot of controls in a webpage like buttons labels and textbox,,,and in the bottom page i kept one grid view..while in run time i kept hide the gridview during the page load,if the button view is clicked,i want to disable the textboxes and labels and buttons which i kept in the top page,and replace that in gridview controls..i did it but gridview is displayed in bottom page only,,it will appear in the top of the page..can u pls help
|
|
|
|
|
Wrap all of the controls at the top in one div and the grid in another. Use a bit of javascript to hide the top div and move the lower up to the top is one way to do it.
You could also use an asp:Panel to surround each and set the visibility of the top one to false on PostBack.
I'm sure there are other ways to do this but these should get you going.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You can place the grid into one div tag
and specify the position: absolute and specify the location where do you want to display the grid.
and make the div visible true false on the basis of the requirement
|
|
|
|
|
what is different between DataAdapter.Update() and Dataset AcceptChange() in ADO.Net??
|
|
|
|
|
AcceptChanges is used to update the dataset while Update method is used to update the database.
The Update method of the DataAdapter is called to resolve changes from a DataSet back to the data source. The Update method, like the Fill method, takes as arguments an instance of a DataSet, and an optional DataTable object or DataTable name. The DataSet instance is the DataSet that contains the changes that have been made, and the DataTable identifies the table from which to retrieve the changes.
Whereas
Calling AcceptChanges on the DataSet, DataTable, or DataRow causes all Original values for a DataRow to be overwritten with the Current values for the DataRow. If the field values that identify the row as unique have been modified, after calling AcceptChanges the Original values will no longer match the values in the data source. AcceptChanges is called automatically for each row during a call to the Update method of a DataAdapter.
Details here: MSDN: Updating Data Sources with DataAdapters[^]
|
|
|
|
|
Needed help inorder to implement a component that facilitates SFTP in .NET.A normal FTP component can be implemented using in-built .NET Libraries.
Alesha Mary Milred Fernandes
|
|
|
|
|
It does not work like this here. You need to share what have you tried so far and where are you stuck - be specific.
For now, look at this discussion thread: SFTP with .net 3.5?[^] - try out.
|
|
|
|
|
i am using open xml in .net 4.0
i want to copy the data contain in one sheet in one work book and paste into sheet different work book with sheet name, i have done this by using miscrosoft.interop.excel, i want same thing using open xml please give the solution
i have done this by using miscrosoft.interop.excel this is the following code the same thing need to be done using openxml please help me on this
Excel.Application oXL;
Excel.Workbook oWB;
Excel.Worksheet oSheet;
Excel.Range oRange;
oXL = new Excel.Application();
// // Set some properties
oXL.Visible = true;
oXL.DisplayAlerts = false
for (int iWorkbook = 0; iWorkbook < Files.Length; iWorkbook++)
{
if (Files[iWorkbook] != string.Empty)
{
oXL.Workbooks.Add(Files[iWorkbook]);
}
}
for (int i = 2; i <= oXL.Workbooks.Count; i++)
{
int count = oXL.Workbooks[i].Worksheets.Count;
oXL.Workbooks[i].Activate();
for (int j = 2; j <= count; j++)
{
Excel._Worksheet ws = (Excel._Worksheet)oXL.Workbooks[i].Worksheets[j];
ws.Select(Type.Missing);
ws.Cells.Select();
string name = ws.Name;
Excel.Range sel = (Excel.Range)oXL.Selection;
if (sel.Cells.Text != string.Empty)
{
sel.Copy(Type.Missing);
Excel._Worksheet sheet = (Excel._Worksheet)oXL.Workbooks[1].Worksheets.Add(
Type.Missing, Type.Missing, Type.Missing, Type.Missing
);
sheet.Paste(Type.Missing, Type.Missing);
sheet.Name = name;
}
}
}
string[] ConsolidatedFiles = Directory.GetFiles(filepath);
if (ConsolidatedFiles.Length > 0)
{
string filetemplates = filepath + "\\" + TemplateType + ".xlsx";
for (int file = 0; file < ConsolidatedFiles.Length; file++)
{
if (ConsolidatedFiles[file].ToString() == filetemplates)
{
File.Delete(ConsolidatedFiles[file]);
}
}
}
filepath = filepath + "\\" + TemplateType + ".xlsx";
oWB.SaveAs(filepath, Excel.XlFileFormat.xlWorkbookDefault,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlExclusive,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
oWB.Close(Type.Missing, Type.Missing, Type.Missing);
oWB = null;
oXL.Quit();
|
|
|
|
|
how to design a master page in asp.net and what is use of mater page ..
|
|
|
|
|