|
|
Dear,
I using GridView in ASP.NET
it can show size paging, and work normally (data changed when click move page), but when I use code below to change row, it does not work (data not changed)
foreach (GridViewRow gvr in rst_Table.Rows)
{
gvr.Cells[0].Text = "" + i.ToString() + ".";
gvr.Cells[5].Text = CommonUtils._gender(ds.Tables[0].Rows[i -1]["Gender"].ToString());
i += 1;
}
Please help me
Socheat
|
|
|
|
|
Socheat.Net wrote: ut when I use code below to change row, it does not work (data not changed)
What's error are you getting ?
cheers,
Abhijit
|
|
|
|
|
I did not get error, but data that display still the same in first page
Socheat
|
|
|
|
|
Debug the code,Is the function is called where you have written the above code.
Cheers!!
Brij
|
|
|
|
|
Where you have written this code?
Cheers!!
Brij
|
|
|
|
|
hi
Could anyone tell me how can I include a chat in my asp.net2005(C#) web application(chat like gmail chat) its like a one to one chat, new messages shown in a pop windows. Anyone give me some sample code....
otherwise send some links related to this...
Regards
mohan
|
|
|
|
|
|
i have a project in asp.net 2003, when i open it in 2005 am getting following error message:
" IT IS AN ERROR TO USE A SECTION REGISTERED AS ALLOWDEFINITION ='MACHINETOAPPLICATION BEYOND APPLICATION LEVEL. THIS ERROR CAN BE CAUSED BY AVIRTUAL DIRECTORYNOT BEING CONFIGURES AS AN APPLICATION IN IIS"
am not much aware about this kind of errors. could any one clear my doubt...
self confidence+hard work=SUCCESS
|
|
|
|
|
Are you trying to open the Web sites from where ?
just open from VS 2005, it will automatically do needful.
cheers,
Abhijit
|
|
|
|
|
yeah abhijit am trying to open from 2005 only, when i built the appliaction i throws the exception i mentioned....
self confidence+hard work=SUCCESS
|
|
|
|
|
where is your web.config file ? is it in the root or Subdirectory ? ?It should be in Root Directory.
Any way I have just goggled, its gives[^]
Let me know if its resolved !
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit,
i found that, here with my application there are two web.config files,, when framework ask to take back up ,there is a web.config file in that folder too, so only this problem, i remove that and now my site is running ..
thanks man...
self confidence+hard work=SUCCESS
|
|
|
|
|
Yup... Great !!!
cheers,
Abhijit
|
|
|
|
|
Hi, I have a question with respect to the security implementation of Menu
using sitemap. Normally in the sitemap we can implement role based security
but that is based on the Role based functionality provided by ASP.NET.
Actually in our site we are using custom roles with our own role management
and stuff. So is there a way to hide or show certain elements of the Sitemap
in my menu based on the custom roles without using asp.net roles
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
hi,
I am doing a Project (in ASP.NET using C# ) in which i have to display a Message Box ,after clicking on a button .I have used a MesterPage and i want a javascript message Box .I mean in the following case:
button_Save_click()
{
.....Other code ...
//after completion of above code,Message should be displayed..
message("Data is Saved...");
}
i Want all these in Java Script(and asp.net using C#). Also it should be as simple as possibe,and as soon as possible.
also a confirmation box in which after clicking on Delete button,It should ask "do u want to delete" if yes do this...else do this...
Please do help me..soon
expecting early reply of anbody..
|
|
|
|
|
For javascript message box ,Do as following
Register the javascript code as below in the button_Save_click() function after saving the data(i e last line in thios function)
string strMsg="data Saved";
Page.ClientScript.RegisterStartupScript(this.GetType(), "ShowMessage", "alert('" + strMsg+ "');", true);
For confirmation box
You use confirm instead of alert and if its true then delete else not as
<input id="btnSave" style="display:none" type="Button" value="Save" onclick="javascript:var blnValid = SaveDataAfterValidation(); if(!blnValid){return;}" onserverclick="SaveData_Click" runat="server"/>
Here SaveDataAfterValidation(); is a javascipt function showing the confirmbox
Cheers!!
Brij
|
|
|
|
|
hi, Thanks for the reply.
as per u say i have tried the below code for a message:
string strMsg="data Saved";
Page.ClientScript.RegisterStartupScript(this.GetType(), "ShowMessage", "alert('" + strMsg+ "');", true);
Although the above code display a messaagebox but still the background page does not display, instead it displays only a blank and new page,then a message box display.
I mean a message box should be displayed on the same page from where it is called.
wating for the positive response.
|
|
|
|
|
I think you must be doing something wrong.Ahter this,the messagebox will be displayed ,when you click on ok then the page will be loaded.If some another page is coming.Check it with URL, for the page name.
And tell me where you have written this piece of code?
Can you write step by step,what you have done on the page for this functionality?
Cheers!!
Brij
|
|
|
|
|
refer following link
[^]
this will help u for Javascript CONFIRM
regards
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi,
I am doing a Project "Message Board" in ASP.NET using C#. I have to display sticky post first. i Mean how to sort so that sticky post should be displayed first..I mean the topics or post which are posted by a person 10 or more than times.
If posts are 10 or more than 10 then should be displayed first in the data grid as well as sorting should be as per the last modified also.
how will it be possible.
please send me a simple code.. or query
|
|
|
|
|
This all you can get using database query from DB applying all the conditions as you said.and then bind the result to the datagrid .Please check the result from DB whether ,it is correct or not.
Cheers!!
Brij
|
|
|
|
|
Hey, can you guys help me out with this real quick?
I have 2 projects (in 1 solution, both .net 3.5) they are ZZZ.Objects and ZZZ.WebUI, the ZZZ.WebUI project contains a reference to ZZZ.Objects. ZZZ.Objects is a class library project, and ZZZ.WebUI is an asp.net web application project
I created a new class file in the objects project, it contains (and of course the using, namespace, etc...)
public class User<br />
{<br />
public string FirstName { get; set; }<br />
public string LastName { get; set; }<br />
}
Then in the Web Application I created a file (test.cs) and I put this exact code in it.
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using ZZZ.Objects;<br />
<br />
namespace ZZZ.WebUI<br />
{<br />
public class Test1<br />
{<br />
User myUser = new User();<br />
}<br />
}<br />
I can't set any properties for myUser! It just pops up with nothing in intellisense, and errors if I try to compile with it manually typed. What is going on?? If I try to instantiate the User Class from a file inside the objects project it works fine! Please help
|
|
|
|
|
I think ,You must've added the refence of that class library project.There is namespace problem.Try with using full namespace at the tome of creating the object as
ZZZ.Objects.User myUser = new ZZZ.Objects.User();
Cheers!!
Brij
|
|
|
|
|
Hmm...Still doesn't work when I try using the full namespace.
Yes, I added the reference to the class library project in my webapp project.
Here is the exact code...
In Project ZZZ.WebApp.Objects - File User.cs
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
<br />
namespace ZZZ.WebApp.Objects<br />
{<br />
public class User<br />
{<br />
public string FirstName { get; set; }<br />
public string LastName { get; set; }<br />
}<br />
}<br />
In Project ZZZ.WebApp.WebUI - File Test1.cs
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Web;<br />
using ZZZ.WebApp.Objects;
<br />
namespace ZZZ.WebApp.WebUI<br />
{<br />
public class Test1<br />
{<br />
ZZZ.WebApp.Objects.User myUser = new ZZZ.WebApp.Objects.User();<br />
myUser.
}<br />
}<br />
|
|
|
|