|
the numeric pages on my datagrid is not working properly if for example i am displaying pages 1 to 10 but there are 90 pages
there is an option to choose "..." which then displays the other pages numbers but when i try to choose one of these numbers for example page 13 it carry's me right back to page 3 instead of page 13
kenny
|
|
|
|
|
Could you post some of your code snippets?
|
|
|
|
|
I have the following routine:
public static string readHtmlPage(string url) {
string result;
WebRequest request = WebRequest.Create(url);
HttpWebResponse response =(HttpWebResponse) request.GetResponse();
Stream dataStream = response.GetResponseStream();
using (StreamReader reader = new StreamReader(dataStream)) {
result = reader.ReadToEnd();
reader.Close();
}
return result;
}
I email the "result" as the body of an email message but it is loosing its CSS formating. It seems that CSS is never applied can anybody detect something wrong?
|
|
|
|
|
The path to the css is probably relative. As what you have sent in the mail is no longer a page, and has no url, the mail program don't know from where it should load the css.
If you specify a complete url for the css file, it has a possibility to work.
---
b { font-weight: normal; }
|
|
|
|
|
Hm. All of the above is true. So what would return back the complete page?
|
|
|
|
|
Either change the page, or change the contents once you have read the page.
If you have other resources, like images, their addresses have to be changed also. Some resources won't work even if you supply a correct address, like javascript includes.
There is no way that you can keep all functionality when you send the code of a page as a mail. A mail program is not a browser, so it will not support everything that a browser does.
---
b { font-weight: normal; }
|
|
|
|
|
Hi..
How could I confirm user registration by email?
Some websites tell the user that he should Activate his Account
(When he register) By the email he will recieve.
How could I make a similar thread?
I am too late but i will never give up
|
|
|
|
|
This has many way,
i.e : you can send a email to user contain a link whith his userID.
http://www.sample.com/confirm.aspx?userID=150
when user clicked link in this page you can varify userID and active it.
|
|
|
|
|
Thank you very much ..I hope I find an article for this subject.
I am too late but i will never give up
|
|
|
|
|
Hello,
I posted a message here before and I dont now if this is the right forum for me byt the question that I need help with is this.
I have this code. This code shown all the image file I have but I need to rean in the textfile to.
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath("/test/"))
Set fc = f.Files
For Each f1 in fc
if right(lcase(f1.name),4) = ".gif" then Response.Write(" ")
Next
%>
And I want to read in a textfile with the same namn but is not a *.gif its a *.txt file. This is the response I get.
foreach (string s in System.IO.Directory.GetFiles(@"c:\dir", "*.gif"))
{
string txtPath = s.Substring(0, s.Length - 3) + "txt";
System.IO.TextReader tr = new System.IO.StreamReader(txtPath);
string text = tr.ReadToEnd();
tr.Close();
}
Now how can I make this work. I need to show the image and then the text after the image. There can be many image and text files so I dont now how I should do it. Is there a king on asp that can help med with this?
|
|
|
|
|
Hi there,
Looks like you want to convert the .net code of reading text files into vb script and put it inside the For Each statement of the classic ASP code. The documentation of the FileSystemObject may give you some hints:
FileSystemObject Sample Code [^]
Also, the Web Development[^] is the right room for the classic ASP questions, and here is for the ASP.NET.
|
|
|
|
|
Hello,
I am new to XML Web Services in .NET. I am looking for some of the following few FREE web services which I can use on my website.
Please suggest me some websites where I can get some of these free webservices.
(1)Sending SMS to anywhere in India
(2)Collecting weather information for Indian Cities and Towns
(3)Checking if an e-mail id is valid or not
(4)Any othere utility webservices
Thanks
-Sudhakar
|
|
|
|
|
|
|
Pals, i have two buttons at one form, one to logout and the other one to submit the form, i fill the form like anyone, the problem is when i press the enter button the logout button event start to working, and i want to start to run submit button, its basic but i didnt fix it.
gracias
keep Learning and you never will be out of date...
|
|
|
|
|
Hi,
It looks like you have problem with naming... If you hit Enter Button....Logout Button should never perform any action and vice versa.... Please check the event handling..
hope it works.
Happy Programming.
Sanjeev
|
|
|
|
|
You might want to check if the submit has the focus when you hit the Enter. Anyway, in the ASP.NET 2.0, you can have a look at the HtmlForm.DefaultButton Property[^]
|
|
|
|
|
To access formview editing element in a class function, I can use the following code:
HttpContext.Current.Request.Form("fvwName$elmName")
How can I access gridview editing row element value in a class function?
|
|
|
|
|
+ Get reference to the Page instance by casting the HttpContext.Current.Handler property to the Page .
+ Get reference to the GridView control using the Page instance and the FindControl method.
+ Get reference to the editable row using the properties of the GridView instance that you have in the previous step.
|
|
|
|
|
Could you please post some code sample?
|
|
|
|
|
Below is the sample code for getting the edit row, and once you have the reference you can easily access the edit values from the cells of the row:
public GridViewRow GetEditRow()
{
Page page = HttpContext.Current.Handler as Page;
GridView gridView = page.FindControl("GridView1") as GridView;
GridViewRow editRow = gridView.Rows[gridView.EditIndex];
return editRow;
}
|
|
|
|
|
When I try your code, I got the following error on line GridViewRow editRow = gridView.Rows[gridView.EditIndex];
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
|
|
|
|
|
That's because I'm using the Edit built-in button in the GridView control so that when I hit the Edit button, the control's mode is changed to the Edit mode and the EditIndex property is set internally. And when the Update button is clicked, I can access the edit row in a seperate class with the above code. I'm not sure when you want to run that code, but if you use your own button, you can raise the Edit command like the built-in button by setting the CommandName as Edit . You might also try to have a look at the EditIndex value at runtime to diagnose your problem. The basic idea is that you need a way to determine the row that is being edited and the index of the row comes to mind as an option.
|
|
|
|
|
I have made an ASP.NET 2 website. I compiled it using release setting both in web.config file and in visual studio. I placed the site on the host. My problem is "when an error occures in any page It does not shows detail information about error". It displays the below message.
Even when I set this tag <customErrors mode="Off"/> it again displays that message .Can someone help me please ? How can I fix it ?
---------------------------------------------------------------
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
--------------------------------------------------------------
|
|
|
|
|
Are you sure your host supports ASPNET2?
|
|
|
|