Click here to Skip to main content
15,914,447 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWhy Do we get this Error? Pin
HimaBindu Vejella23-Apr-06 21:14
HimaBindu Vejella23-Apr-06 21:14 
AnswerRe: Why Do we get this Error? Pin
minhpc_bk23-Apr-06 21:27
minhpc_bk23-Apr-06 21:27 
QuestionBind data into HTML server table control Pin
nesaraja23-Apr-06 20:39
nesaraja23-Apr-06 20:39 
AnswerRe: Bind data into HTML server table control Pin
minhpc_bk23-Apr-06 21:20
minhpc_bk23-Apr-06 21:20 
GeneralRe: Bind data into HTML server table control Pin
nesaraja23-Apr-06 21:27
nesaraja23-Apr-06 21:27 
AnswerRe: Bind data into HTML server table control Pin
HimaBindu Vejella23-Apr-06 21:28
HimaBindu Vejella23-Apr-06 21:28 
GeneralRe: Bind data into HTML server table control Pin
nesaraja23-Apr-06 22:20
nesaraja23-Apr-06 22:20 
QuestionImageButton command argument Pin
TheEagle23-Apr-06 20:38
TheEagle23-Apr-06 20:38 
Hi..
I have a DataList that includes in its ItemTemplate an ImageButton which should use FieldNO(a DataItem field in the datasource ) as a QueryString to redirect() to another page:

Response.Redirect("default.aspx?FieldNO="+fieldNO+"&ProjectNO="+projectNO);

But i want this to happen only in a specific situation
(if(searchString!=null) is true) So the DataBinder.Eval() alone wont do what i want.So i used the following code in the method assigned to the OnCommand ImageButton attribute:

string fieldNO;
string argu=e.CommandArgument.ToString();
string[] argss=argu.Split(',');
if(searchString!=null)
{
DataRowView drv=(DataRowView)lProjects.Items[Convert.ToInt32(argss[1])].DataItem;
fieldNO=Convert.ToString(drv["FieldNO"]);
}

Where lProjects is the DataList And the Command Argument of the ImageButton is:

CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ProjectNO")+","+Container.ItemIndex%>'

There is no relation between "ProjectNO" and the problem.The problem exists with the other field "FieldNO"
which i should get it from the datasource of the DataList in a specific condition.

But this code give me the error :
Object reference is not set to an instance.

Sorry if i couldnt explain my problem.

Could any one help?
AnswerRe: ImageButton command argument Pin
minhpc_bk23-Apr-06 21:16
minhpc_bk23-Apr-06 21:16 
GeneralRe: ImageButton command argument Pin
TheEagle24-Apr-06 4:54
TheEagle24-Apr-06 4:54 
GeneralRe: ImageButton command argument Pin
minhpc_bk24-Apr-06 15:54
minhpc_bk24-Apr-06 15:54 
GeneralRe: ImageButton command argument Pin
TheEagle24-Apr-06 16:42
TheEagle24-Apr-06 16:42 
GeneralRe: ImageButton command argument Pin
minhpc_bk24-Apr-06 16:54
minhpc_bk24-Apr-06 16:54 
GeneralRe: ImageButton command argument Pin
TheEagle24-Apr-06 23:09
TheEagle24-Apr-06 23:09 
GeneralRe: ImageButton command argument Pin
minhpc_bk24-Apr-06 23:36
minhpc_bk24-Apr-06 23:36 
GeneralRe: ImageButton command argument Pin
TheEagle29-Apr-06 4:51
TheEagle29-Apr-06 4:51 
GeneralRe: ImageButton command argument Pin
TheEagle1-May-06 17:23
TheEagle1-May-06 17:23 
Questionproblem with validation control Pin
sudharsong23-Apr-06 20:01
sudharsong23-Apr-06 20:01 
AnswerRe: problem with validation control Pin
minhpc_bk23-Apr-06 20:44
minhpc_bk23-Apr-06 20:44 
GeneralRe: problem with validation control Pin
sudharsong23-Apr-06 20:48
sudharsong23-Apr-06 20:48 
AnswerRe: problem with validation control Pin
HimaBindu Vejella23-Apr-06 21:01
HimaBindu Vejella23-Apr-06 21:01 
GeneralRe: problem with validation control Pin
sudharsong23-Apr-06 21:14
sudharsong23-Apr-06 21:14 
QuestionHow to insert to SQL Express Edition from a textbox and a SAVE button? Pin
tanpanjang23-Apr-06 17:42
tanpanjang23-Apr-06 17:42 
AnswerRe: How to insert to SQL Express Edition from a textbox and a SAVE button? Pin
minhpc_bk23-Apr-06 20:40
minhpc_bk23-Apr-06 20:40 
QuestionInsert multiple records Pin
tanpanjang23-Apr-06 17:34
tanpanjang23-Apr-06 17:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.