|
This is an example of a situation where you are sufficiently a beginner that you should not be writing any sort of commercial code, and the code you're writing to learn, should be based on a book you're working through. You asked a very top level question, one trivially answered with a google search, or best answered with a book. I can't imagine how I'd give a detailed answer to such a broad question in the context of a forum post. Perhaps you should do some research and ask here when you have sufficient experience to ask specific questions, and to understand the answers ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
http://www.asp.net/LEARN/videos
a nice easy video for you to watch
We are not a Code Charity
|
|
|
|
|
How to reduse this Reload a new page into the browser to fire the unload event for this page. and I can also use the back or forward buttons to load a new page and fire this event.?????
|
|
|
|
|
You can't. IE doesn't give you that sort of control.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi iam binding my gridview in runtime Using dartabase...,
So its in autogenerate columns true mode...,
How i can tell my particular cell value want to be left align?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You can't, you need to create a template for that, and you're skipping that step with the autogenerate. You may be able to do some sort of change in the item data bound event, but it seems like a hack compared to just creating your template in the first place
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I am trying to do ajax with jquery and I am finally making some progress.
I been following this tutorial
http://www.codeproject.com/KB/ajax/AjaxJQuerySample.aspx[^]
and it basically seems that in order to get jquery ajax to work you need to make a separate file for the code you want to get back.
Now in the article it states this: "(**Note: You could also point to an HttpHandler, but in the interest of brevity, this example will follow this method.)"
So am I correct basically if I followed the tutorial I would have to make a separate file for each of my ajax functions? So if I got 6 buttons that do 6 different ajax requests I would need 6 .aspx pages? Or 6 of these HttpHandlers?
If some where are some tutorials on HttpHandlers used with jquery?
|
|
|
|
|
I don't think so, I think you can pass something on the URL to tell your HTTP handler which action to perform. If you just create a new HTTP handler using the VS IDE, you can point to that, and write code in there to return whatever you like.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I am new comer to .Net.
I am developing a simple application in C# and Asp.In that application I have to write the code to download a software from particular site and the code to install that software in our system.I don't have any knowledge on how to create set up file,code to download, .Exe file etc.
Please anyone Help me.I will be very thankful to them.
Thanks in Advance
|
|
|
|
|
you can't install a program from ASP.NET. You download a file by providing a link to it, or if you prefer, using Response.BinaryWrite to pass it back from a page.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Please search the Internet before posting questions like the above.
If you are a newcomer to aspnet the search for tutorials
We are not a Code Charity
|
|
|
|
|
Dear all ,
I am using C# ,asp.net2.0
I am making question list (as question are dynamic) I list in gridview and inside gridview dropdownlist populated with possible response.
Now I have to fetch each row of gridview and user response against it on button click outside of gridview
Please suggest some link or ideas
Thank you
regards
imran khan
|
|
|
|
|
Try it..Wait for good Solution...
Under button Click
for(int i=0;i<=gridview.rows.count-1;i++)
{
string answer=gridview.rows[i].cells[index].text;
}
|
|
|
|
|
I am using a dll, itextShart.dll
To export data to PDF files
It works fine in my local system but on uploading this to the
Server I am getting an error
As bellow
Could not load file or assembly 'itextsharp, Version=4.0.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The module was expected to contain an assembly manifest. 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.BadImageFormatException: Could not load file or assembly 'itextsharp, Version=4.0.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The module was expected to contain an assembly manifest.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'itextsharp, Version=4.0.6.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' could not be loaded.
WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
What can I do
To work things fine
Kodee
|
|
|
|
|
Looks like you didn't copy the manifest file to the server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for answering Christi.
Can u tell me what is the manifest file and where can i find that file.
I have downloaded the itextsharp.dll file and im uploading the same to the server.
Kodee
|
|
|
|
|
i wrote this code does any body know why is it wrong ? how should i write yhis:currentUser.IndexOf("\")
string currentUser = WindowsIdentity.GetCurrent().Name;
currentUser = currentUser.Substring(currentUser.IndexOf("\") + 1);
|
|
|
|
|
Well, why do you tink it's wrong ? You don't tell is if there's an error, if there's a wrong result, or what.
First problem: \ is used to escape things. So , \" puts a quote in the string, it does not equate to a \ in quotes. "\\" or @"\" is what you need
Second problem: this code assumes that there's a character after the slash in currentUser. If not, it will blow up.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
so thanks , that write i wrote ""\"" and its right.
|
|
|
|
|
hi i am creating the hyperlink column like this ........
HyperLinkColumn hlpField = new HyperLinkColumn();
hlpField.DataTextField = "test";
hlpField.HeaderText = "test";
datagrid.Columns.Add(hlpField);
and now i want to give the url to this hyperlink field in the itemdatabound event......
how can i do this
|
|
|
|
|
Why are you adding it in code instead of in the aspx ?
You can subscribe to the itemdatabound event and look for hte column there, but it would be better to build a template that just builds the URL
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
instead of using hyperlink column, use linkbutton. find attached the code below.
aspx file code:
---------------
<asp:DataGrid DataKeyField="event_id" ID="eventsGrid" runat="server" CssClass="textbld"
AllowSorting="True" AutoGenerateColumns="False" Width="518px" OnItemDataBound="eventsGrid_ItemDataBound"
AlternatingItemStyle-CssClass="alternativeTxt" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px" CellPadding="0" HorizontalAlign="Left" >
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditItemStyle BackColor="#2461BF" />
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<AlternatingItemStyle CssClass="alternativeTxt" />
<ItemStyle HorizontalAlign="Left" CssClass="itemTxt" />
<Columns>
<!-- Use the below variable event_id as hidden variables from the database-->
<asp:BoundColumn DataField="event_id" Visible="False"></asp:BoundColumn>
<!-- bind the hidden variable (event_id) value to the link button using "Eval" function-->
<asp:TemplateColumn HeaderText="Ort" HeaderStyle-CssClass="padlist">
<ItemTemplate>
<asp:LinkButton ID="lnkCity" runat="server" CommandArgument='<%# Eval("event_id") %>'
OnCommand="lnkCity_Command" CssClass="Blacklink"></asp:LinkButton>
</ItemTemplate>
<ItemStyle CssClass="eventsTxt" />
</asp:TemplateColumn>
</Columns>
<HeaderStyle CssClass="head_txt Head_R1" />
</asp:DataGrid>
.cs file code:
---------------
In the onclick event of the linkbutton in the datagrid, give the link url as below.
protected void lnkCity_Command(object sender, CommandEventArgs e)
{
Response.Redirect("Popup.aspx");
}
Kodee
|
|
|
|
|
Hello Friends,
I want to use the my Public property values in my destination page using the Cross-Page Posting
Page1.aspx
public string myName
{
get
{
return txtName.Text;
}
}
Page2.aspx
<%@ PreviousPageType VirtualPath="~/Page1.aspx" %>
and to use the value of myName property in Page2.aspx i'm using the following code
txtName.Text = PreviousPage.myName;
or
Rough1 myRough;
myRough = (Rough1)PreviousPage;
txtName.Text = myRough.myName;
but it's throwing an error "Object reference not set to an instance of an object"
|
|
|
|
|
Which line throws the error ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
txtName.Text = PreviousPage.myName;
this line throwing the error
|
|
|
|