|
Someone else asked this a couple of posts down ( or you asked twice with two different accounts) . It's done with javascript, which means it's not really an ASP.NET question. Google for samples
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Here is a sample which moves the selected item up. You can revise to meet your need.
protected void LinkButtonMoveUpProducts_Click(object sender, EventArgs e)
{
if (this.ListBoxProducts.SelectedIndex <= 0)
{
return;
}
int index = this.ListBoxProducts.SelectedIndex;
ListItem li = this.ListBoxProducts.SelectedItem;
this.ListBoxProducts.Items.Remove(li);
this.ListBoxProducts.Items.Insert(index - 1, li);
}
|
|
|
|
|
I have asp.net & vb.net Project it work fine in my local laptop but when i host it in ixwebhosting i have problem you can try it www.sudantrade.gov.sd the problem is :-
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
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>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
|
|
|
|
|
Why is it that so many people post here without even READING the error ? The error is TELLING you that you need to change your web config in order to see what the ACTUAL error is, this error is just telling you that the web config is set up to hide the error from a remote user.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have asp.net & vb.net Project it work fine in my local laptop but when i host it in ixwebhosting i have problem you can try it www.sudantrade.gov.sd the problem is :-
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
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".
<configuration>
<system.web>
<customerrors mode="Off">
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customerrors mode="RemoteOnly" defaultredirect="mycustompage.htm">
|
|
|
|
|
I want to get all names from an email that saved in contact. Just like a social network used to friend request to those contact name.
|
|
|
|
|
Hi Sir
I have one doubt that is
the list box having items i want to change the priorities of listbox using move up down first last please send code for that question
|
|
|
|
|
Moving items up and down on the client is done with javascript. Literally hundreds of samples are a google away
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
hi,
I have codebelow to populate treeview it works fine & binds value & text to nodes perfectly,
I want to set background for selected nodes & get pathvalue of selected nodes
I tried to put code inside
TvFile_SelectedNodeChanged but it fires only for root node. it doenst fire for any other node.please help me to get selected node value
please help me out,
code
Partial Class FileApplication
Inherits System.Web.UI.Page
Private Const VirtualImageRoot As String = "~/FileFolder/"
Private ClsFileapp As New TreeFileApplication
Private GetCurId As String = String.Empty
Private ds As DataSet
Private Sub PopulateTree()
Dim rootFolder As New DirectoryInfo(Server.MapPath(VirtualImageRoot))
Dim root As TreeNode = AddNodeAndDescendent(0, Nothing)
TvFile.Nodes.Add(root)
End Sub
Private Function AddNodeAndDescendent(ByVal val As Integer, ByVal parentNode As TreeNode) As TreeNode
Dim virtualFolderPath As String
ds = New DataSet()
If parentNode Is Nothing Then
virtualFolderPath = VirtualImageRoot
ds = ClsFileapp.GetRootFolder()
Else
ds = ClsFileapp.GetRootFolder(val)
virtualFolderPath = parentNode.Value & val & "/"
End If
Dim node As New TreeNode(ClsFileapp.GetfolderName(val), val)
Dim reader As IDataReader = ds.CreateDataReader
While reader.Read()
Dim child As TreeNode = AddNodeAndDescendent(CInt(reader("id")), node)
child.NavigateUrl = "FileApplication.aspx?id=" & reader("id")
child.SelectAction = TreeNodeSelectAction.Expand
node.ChildNodes.Add(child)
End While
Return node
End Function
Private Sub DisplayFileNFolder(ByVal folderid As String)
ds = New DataSet()
ds = ClsFileapp.GetFilesFolder(CInt(folderid))
If ds.Tables(0).Rows.Count > 0 Then
DLDIsplayFiles.DataSource = ds
DLDIsplayFiles.DataBind()
End If
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GetCurId = Request.QueryString.Get("id")
If GetCurId IsNot Nothing Then
DisplayFileNFolder(GetCurId)
End If
If Not IsPostBack Then
PopulateTree()
MPopupcreate.Hide()
End If
End Sub
Protected Sub TvFile_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TvFile.SelectedNodeChanged
TvFile.SelectedNodeStyle.BackColor = Drawing.Color.Blue
End Sub
End Class
|
|
|
|
|
Does anyone know how asp.net 2.0 can dynamically write a .html file without saving it to the server. Can you stream a file down to the browser, anything.html, without anything.html physically being on the hard drive? I hope this makes sense.
Note:I want to create a completely seperate page with its own unique url only existing in the users' browser with its own name.
Any help or hint would be appreciated!
|
|
|
|
|
You seem to want to write a http handler, so that you can redirect a url like www.mysite.com/myuser to a URL which generates the page this fictional URL is pretending to point to.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thank you for so quick reply!
I don't want to write a http handler.
|
|
|
|
|
Then you are utterly, utterly screwed. A HTTP Handler is both trival to write in ASP.NET and the ONLY way for the browser to point to a page that does not exist, and yet return something.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Maybe below codes can give you some inspiration!
function onpreviewsomething(content)
{
var win_preview = window.open("", "_blank", "");
win_preview.document.open('text/html', 'replace');
win_preview.opener = null;
win_preview.document.writeln(content);
win_preview.document.close();
return false;
}
|
|
|
|
|
I want to get email contact from yahoo, gmail, hotmail etc using .NET.
Please help me with source code.
shahdat
|
|
|
|
|
This has NOTHING to do with ASP.NET. If you want to be provided with code, I suggest you post a job on rentacoder.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello, This Is Vikash.
I have a small problem.
I have a page that shows a list of products.
But since it is a long list, the headers are not visible if user scrolls down.
Can anyone tell me or give some idea whether I can display the Header row after every 10 datarows in my gridview.
Any help or idea would be appreciated.
Thanks in Advance, awaiting a reply soon.
|
|
|
|
|
Use javascript to generate your list inside a scrolling div, so the headers are always visible at the top. I would imagine you may be able to do this with a header and footer template, or you may need to generate the whole lot with a repeater to give you that sort of flexibility.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi..i have tried 100000000000 of times to delete a record from GridView..always i got the same error "The GridView 'GridView1' fired event RowDeleting which wasn't handled."
I have set property of GridView..i.e Auto Generate Delete Button
CODE:-
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=demomockTest;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("select * from RegisteredHR ", con);
con.Open();
da.DeleteCommand = new SqlCommand("deleterow from RegisteredHR where HRID=", con);
da.DeleteCommand.ExecuteNonQuery();
con.Close();
bindgrid();
}
public void bindgrid()
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=demomockTest;Integrated Security=True");
SqlCommand cmd = new SqlCommand("select * from RegisteredHR ", con);
SqlDataAdapter da = new SqlDataAdapter("", con);
da.SelectCommand = new SqlCommand("select * from RegisteredHR", con);
DataSet ds = new DataSet();
da.Fill(ds, "data");
GridView1.DataSource = ds.Tables[0].DefaultView;
GridView1.DataBind();
}
<asp:linkbutton id="LinkButton1" runat="server" onclick="LinkButton1_Click" width="27px" xmlns:asp="#unknown">See
<asp:linkbutton id="LinkButton2" runat="server" onclick="LinkButton2_Click" xmlns:asp="#unknown">Select All
<asp:label id="Label1" runat="server" backcolor="#FFE0C0" width="62px" xmlns:asp="#unknown">
<asp:gridview id="GridView1" runat="server" xmlns:asp="#unknown">
BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
CellPadding="3" GridLines="Horizontal" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="669px" AutoGenerateDeleteButton="True">
<footerstyle backcolor="#B5C7DE" forecolor="#4A3C8C">
<columns> <asp:templatefield>
<itemtemplate>
<asp:checkbox id="CheckBox1" runat="server">
<rowstyle backcolor="#E7E7FF" forecolor="#4A3C8C">
<selectedrowstyle backcolor="#738A9C" font-bold="True" forecolor="#F7F7F7">
<pagerstyle backcolor="#E7E7FF" forecolor="#4A3C8C" horizontalalign="Right">
<headerstyle backcolor="#4A3C8C" font-bold="True" forecolor="#F7F7F7">
<alternatingrowstyle backcolor="#F7F7F7">
Help me out
Regards
Roopa
|
|
|
|
|
Turns out you're a retard. Why would you try it over and over when the error message tells you what is wrong ? Were you hoping that auto delete means the grid will write the code for you ? If you have a delete button, you need to handle that event, and you need to write some code.
Also, your code is illegible. LinkButton1 ? Gridviw1 ? Checkbox1 ? Are you trying to write code people can't read ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Link Button,Checkboxes r the part of my project...n i ws not hoping..i hd pasted tht code..u can check tht code..
Did u find any error in code?? If yes plz drop a mail..n Thanks
|
|
|
|
|
Do you really think this reply was written in the english language ? Txtspeak makes you look stupid(er).
Again, the error message means what it says. Nothing you said to me, changes or addresses anything I said to you.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
roopamukherjee wrote: Hi..i have tried 100000000000 of times to delete a record from GridView.
roopamukherjee wrote: always i got the same error "The GridView 'GridView1' fired event RowDeleting which wasn't handled."
It is clearing saying that you didn't handled the Row Deleting event.
roopamukherjee wrote: <asp:linkbutton id="LinkButton1" runat="server" onclick="LinkButton1_Click" width="27px" xmlns:asp="#unknown">See
What is that ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi...
I need to know whether we can, some how, put values in text fields of any web page ( Any website, like registration page of yahoo, text field of sms.com, login fields of gmail etc ) using asp.net.
Regards:
TurtleRock
|
|
|
|
|
I don't know what is your exact requirement but I am sure code won't work on site having CAPTCHA images.
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|