|
thank you for helping me solve my problem... the links u gave realy helped a lot....
xxx
|
|
|
|
|
I have a gridview
i want to capture the gridview cell value to a int varible.
i wrote the code as below
int s=0;
for (int i = 0; i < GvFeeTransaction.Rows.Count - 1; i++)
{
CheckBox c = ((CheckBox)(GvFeeTransaction.Rows[i].FindControl("ChkSelect")));
if (c.Checked)
{
if (GvFeeTransaction.Rows[i].Cells[4].Text.Trim() != " ")
{
s = s + int.Parse(GvFeeTransaction.Rows[i].Cells[4].Text);
s = s + Convert.ToInt32(GvFeeTransaction.Rows[i].Cells[4].Text);
s =s+(int)(GvFeeTransaction.Rows[i].Cells[4].Text);
}
else
{
s = s + 0;
}
}
}
nothing is working perfectly means int.parse,convert.toint32,(int)-------
it is showing
Input string was not in a correct format.
i want the sol for this one
i need the answer let me know the exact sol from u.
|
|
|
|
|
Put a try catch block around this statement
s = s + int.Parse(GvFeeTransaction.Rows[i].Cells[4].Text);
and also put a break point on the catch block. Check whether it returns a value that cannot be converted into a number.
|
|
|
|
|
GvFeeTransaction.Rows[i].Cells[4].Text
It looks right
maybe you are counting the columns wrong
Make sure you dont have any invisible columns, because those columns count as well
The easiest way is to put a breackpoint and try different column indices in the immediate window to check wichone has the correct column
Or try this: GridView1.HeaderRow.Cells[4].Text to see the header text
Alexei Rodriguez
|
|
|
|
|
My aim is to browse a asp.net app thats hosted in my pc's iis, on my windows mobile browser. For this is use the URL which is something like:
http://MachineName/AppName/default.aspx
The error message I get is, "The Page cannot be displayed or downlaoded because the connection was lost. Check the connction and try again later."
I have a i-Mate PDAL mobile with windows mobile 5.0 and .Net framework 3.5 installed, which i connect to the pc which is hosting the asp.net web app using a USB cable.
Now the queries i have are:
- How does windows mobile resolve urls and how do i set a DNS server for the mobile?
- if i browse to '\\MachineName' on the mobile browser, its shows me the shared folder of my pc on mobile browser. So why it cannot access the web app's url?
- i tried a couple of settings in the Connections settings of the mobile, but didn't work. Any thing specific i need to do?
Thanx.
s.a.w.
|
|
|
|
|
Try using your PCs IP: 192.168.1.120/Appname/PageName.aspx
And make sure you have a conection, just to make sure, try to open any page like google.com
Alexei Rodriguez
|
|
|
|
|
Thanx, for the reply. But it doesn't work using IP either.
s.a.w.
|
|
|
|
|
Hi,
I have a requirement in my project which is to place a panel on a windows form and then to select particular area on it using mouse. then we have to display a image in this selected area on the panel with the selected dimensions.
If anyone have idea to solve this please reply me.
Thanks in advance.
|
|
|
|
|
If you can select an arbitrary area in a web app, you can't do it with ASP.NEt, you need javascript.
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 )
|
|
|
|
|
Nekkantidivya wrote: windows form
wrong forum, try this[^]
|
|
|
|
|
Hi all,
How to generate html control object based on the given string. (string contains the proper html tags, this string is actually generated from rendercontrol function of a webcontrol).
Please help me out on this .
thanks,
Zaki
|
|
|
|
|
I am unable to get your question, Can you please elaborate it a bit?
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
I have a field in the database which holds the html content of a web control (for example Emploee Name). Bsed on this string content i need to identify the type of a webcontrol and get all its assigned properties along with the values of each property.
we can get the assigned properties and values by using GetType() and GetProperties() functions. All i need is how to convert the string content to html control.
One way is to parse the string and identify the type of a control by looking at Type attribute.(exmple ).
But this shouldn't be the best way to achive this .
please help me.
|
|
|
|
|
i need code for displaying the data in gridview
|
|
|
|
|
|
You're a retard. Thanks for playing. People like you, who cannot read a book or use google, are the reason outsourcing is so bad for our industry.
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
you can use this simple code
String conString="data source=localhost\SQLEXPRESS;initial catalog=New;integrated security=true";
SqlConnection cn = new SqlConnection(conString);
SqlCommand cmdFillGrid = new SqlCommand("select * from myTable", cn);
SqlDataAdapter adapter = new SqlDataAdapter(cmdFillGrid);
DataSet ds = new DataSet();
adapter.Fill(ds, "myTable");
GridView1.DataSource = ds.Tables["myTable"];
GridView1.DataBind();
Essam Moustafa
|
|
|
|
|
I'm running an ASP.NET project using mainly html; I'm not sure how to make the text a bit larger, because even when I adjust the tags within the .css file, the text seems to remain of the same size.
[CODE]
Articles.aspx
------------
...
<asp:Content ContentPlaceHolderID="Body" runat="server">
[B] <span class="body">[/B] This page is still under construction. </span>
</asp:Content>
...
[/CODE]
[CODE]
common.css
------------
...
body{
background-position: #fff;
font: 62.5%/2.2em "Lucida Grande", Tahoma, Verdana, Arial, Helvetica, sans-serif;
color: #4b4942;
background: #fff;
font-size: x-large;
}
...
[/CODE]
Screenshots of output at http://cid-b712073b3513eb8e.skydrive.live.com/self.aspx/.Public/blog-what%20bugs%20me.docx
Source available at http://cid-b712073b3513eb8e.skydrive.live.com/self.aspx/.Public/Blog.rar
Environment
Visual Studio 2008 SP1 + .NET 3.5 SP1
WinXP SP2
IIS 5.1
Jon
|
|
|
|
|
[B] [/B] This page is still under construction.
Firstly you should do it like
[B] This page is still under construction. [/B]
Secondly make sure that you have included the css file in your page.
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
Hi every one
i am working in organization and i have developed one website
my question is i publish my website perfectly now i have to show the website to my boss
in our company there is no server i developed website in client machine
if i install IIS in my boss Computer and i put my publish files in wwwroot directory and i make
virtual path will it work or i need to register the dotnet with IIS
but i con't install dotnet on my boss system
and one more thing i use database also to save user registration detail and for some other pages also
how to show demo on my boss system
please help me its very very very urgent
thanks in advance
|
|
|
|
|
Make virtual direcory in your own system
And access it from your boss system. You can do it like http://IP OF YOUR SYSTEM/VirutalDirecoryName/PageName.aspx
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
thanks for support
i tried that but i got the error that is page cannot be display
|
|
|
|
|
you have to specify ur boss' computer name or IP in your firewall so that his computer can access your IIS...
Open your firewall setup in control panel and click "advance"... from there, read the instruction on how to give acccess...
hope this will help you.
xxx
|
|
|
|
|
thanks for support
the way u said i did the same thing i open the control panel
from there i open firewall setup then i open advance setting
then i give permission to my boss computer to access my website
i ping my computer from my boss computer. He get the reply from
my computer.
when i tried to open the website again it is given page cannot be display
i type the url in this way http://myipaddress/websitename/Default.aspx
will i have to set some setting from my iis or some other way is there
i will tell what i did after publishing i copy the publish files and i past
that file into wwwroot directory then i open the inetmgr from run then i open
default website i saw my website folder i right click that folder after that i
open the property and i set virtual directory then i closed the iis and from my
computer i open the internet explorer i type the address as
http://localhost/mywebsitename its work fine in localhost .
will i have set some setting to access my boss from my computer
please help me as soon as possible because i have to show today at any cost
please help me
|
|
|
|
|
r u sure u can run your ASPX file in your own PC??? because f u did, the problem s the comunication between your pc and your bos' PC... you should make sure you pinged your pos' pc.
pls check f u did the following....
1. click "control panel", "Windows Firewall", "Advanced"
2. clisk "Local Area Connection" or d network u use in order to connect
to your bos' PC.
3. Click "Settings", "Services",
4. "Web Server(HTTP)" must be check.
5. Click "Edit" button....
6. input d IP address of your Bos' PC...
7. Save all d changes....
P.S.
if it doesn't work, do the above instructions to your boss PC..... Your bos' PC myt have d same problem as yours... booth PC shud allow inbound and outbound communication in one common port. I know u understand what I mean....
F instructions were done.... type "http://xxx.xxx.xxx.xxx/mywebsitename" in your bos' pc.
xxx.xxx.xxx.xxx is your d IP address of your PC.
xxx
|
|
|
|