Click here to Skip to main content
16,004,806 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionsome problem Pin
Imran Khan Pathan2-Feb-07 1:11
Imran Khan Pathan2-Feb-07 1:11 
AnswerRe: some problem Pin
Blue_Boy2-Feb-07 1:19
Blue_Boy2-Feb-07 1:19 
GeneralRe: some problem Pin
Imran Khan Pathan2-Feb-07 1:29
Imran Khan Pathan2-Feb-07 1:29 
AnswerRe: some problem Pin
Sandeep Akhare2-Feb-07 1:27
Sandeep Akhare2-Feb-07 1:27 
GeneralRe: some problem Pin
Imran Khan Pathan2-Feb-07 1:42
Imran Khan Pathan2-Feb-07 1:42 
AnswerRe: some problem Pin
Pradipta Basu2-Feb-07 9:39
Pradipta Basu2-Feb-07 9:39 
QuestionHow should I pass a variable to a "controlid" on a ControlParameter. Pin
Red_Wizard_Shot_The_Food2-Feb-07 0:40
Red_Wizard_Shot_The_Food2-Feb-07 0:40 
AnswerRe: How should I pass a variable to a "controlid" on a ControlParameter. Pin
minhpc_bk2-Feb-07 16:28
minhpc_bk2-Feb-07 16:28 
Basically, the ControlParameter does not support the DataBinding event so you cannot use a data binding expression to set the ControlID property of the parameter, and your choice is to do this in code. Also, you need to be aware that the ControlID property needs to be updated before it is used to populate the value, if it happens after then you'll get an error as the specified control is not found. Normally, the ControlParameter uses its ControlID property to evaluate the parameter value in the overridable Evaluate method which occurs in the LoadComplete event of the Page instance. So you can put your code to update the ControlID in the events (of the data source control or the Page instance) that happens before the Page_LoadComplete and of cource after the data source control is built. For example, you can use the Load event of the data source control:
protected void SqlDataSource1_Load(object sender, EventArgs e)
{
    //Assuming the ControlPatameter is the first one in the UpdateParameter collection.	
    ControlParameter para = SqlDataSource1.UpdateParameters[0] as ControlParameter;
    para.ControlID = "GridView1$ctl0" + (GridView1.EditIndex + 2) + "$DropDownList1";
}


where the EditIndex property of the GridView control will give you the index of the row being edited, this is a zero-based value, however the index used in the UniqueID of the dropdownlist is a one-based value and it is counted from the header row. Therefore, you have to add 2 to the EditIndex to get the correct number used in the UniqueID.



QuestionProblem in SAVING Portion of the Web Page content into WORD .doc file Pin
Jay_se2-Feb-07 0:28
Jay_se2-Feb-07 0:28 
QuestionObject reference not set to an instance of an object. Pin
Imran Khan Pathan2-Feb-07 0:23
Imran Khan Pathan2-Feb-07 0:23 
AnswerRe: Object reference not set to an instance of an object. Pin
Colin Angus Mackay2-Feb-07 0:37
Colin Angus Mackay2-Feb-07 0:37 
AnswerRe: Object reference not set to an instance of an object. Pin
blue_arc2-Feb-07 0:48
blue_arc2-Feb-07 0:48 
GeneralRe: Object reference not set to an instance of an object. Pin
Colin Angus Mackay2-Feb-07 3:05
Colin Angus Mackay2-Feb-07 3:05 
GeneralRe: Object reference not set to an instance of an object. Pin
RichardGrimmer5-Feb-07 23:52
RichardGrimmer5-Feb-07 23:52 
AnswerRe: Object reference not set to an instance of an object. Pin
Blue_Boy2-Feb-07 1:13
Blue_Boy2-Feb-07 1:13 
AnswerRe: Object reference not set to an instance of an object. Pin
Vasudevan Deepak Kumar2-Feb-07 1:48
Vasudevan Deepak Kumar2-Feb-07 1:48 
GeneralRe: Object reference not set to an instance of an object. Pin
Colin Angus Mackay2-Feb-07 3:08
Colin Angus Mackay2-Feb-07 3:08 
GeneralRe: Object reference not set to an instance of an object. Pin
Vasudevan Deepak Kumar2-Feb-07 3:42
Vasudevan Deepak Kumar2-Feb-07 3:42 
JokeRe: Object reference not set to an instance of an object. Pin
Malcolm Smart2-Feb-07 14:23
Malcolm Smart2-Feb-07 14:23 
QuestionAsynchronous call on IIS not working (does on Development server) Pin
Malcolm Smart1-Feb-07 23:56
Malcolm Smart1-Feb-07 23:56 
AnswerRe: Asynchronous call on IIS not working (does on Development server) Pin
blue_arc2-Feb-07 0:25
blue_arc2-Feb-07 0:25 
GeneralRe: Asynchronous call on IIS not working (does on Development server) Pin
Malcolm Smart2-Feb-07 0:44
Malcolm Smart2-Feb-07 0:44 
AnswerRe: Asynchronous call on IIS not working (does on Development server) Pin
Malcolm Smart2-Feb-07 1:09
Malcolm Smart2-Feb-07 1:09 
Questiondifference between dotnet nuke and Microsoft Solution Framework Pin
imshally811-Feb-07 23:41
imshally811-Feb-07 23:41 
AnswerRe: difference between dotnet nuke and Microsoft Solution Framework Pin
Colin Angus Mackay2-Feb-07 0:13
Colin Angus Mackay2-Feb-07 0:13 

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.