Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > FormView - set mode in aspx based on url param

Reply
Thread Tools

FormView - set mode in aspx based on url param

 
 
David Thielen
Guest
Posts: n/a
 
      06-16-2006
Hi;

I would like my FormView to be in Edit/Insert mode depending on if there is
a username=abc (not abc specifically, just that there is a username=) in the
url. Or that my ObjectDataSource select finds something. If it's there, it's
edit mode. Otherwise it's insert mode.

At present I am doing:
if (! IsPostBack)
{
if (Request.QueryString["username"] != null)
EditUser.ChangeMode(FormViewMode.Edit);
else
EditUser.ChangeMode(FormViewMode.Insert);
}

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      06-16-2006
Hi Dave,

I think your current approach is reasonable. Is there anything else you
worry about this?

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
 
David Thielen
Guest
Posts: n/a
 
      06-16-2006
No - just was wondering if it could be done in the aspx part.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



"Steven Cheng[MSFT]" wrote:

> Hi Dave,
>
> I think your current approach is reasonable. Is there anything else you
> worry about this?
>
> Regards,
>
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
>
> ==================================================
>
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
>
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML::Template->param() : You gave me an odd number of parameters to param()! Dave Perl Misc 5 04-26-2011 02:44 AM
Formview dropdownlist won't populate in insert mode, but does in edit mode ??? jobs at webdos ASP .Net Web Controls 0 10-09-2006 03:38 PM
Set mode in FormView on Page_Load staeri@gmail.com ASP .Net 2 04-08-2006 12:28 PM
Overload by deriv class param; call w base class param ectoplasm C++ 12 07-28-2005 08:20 AM
XSLT: How to replace param name with this param's value ? Geathaa XML 2 07-30-2003 06:48 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57