开发者

Do you HAVE to use the CommandArgument property with a LinkButton which is inside of a repeater?

开发者 https://www.devze.com 2023-01-20 05:55 出处:网络
The link button only sets some value as true and does nothing else. When I run the code the LinkButton\'s event just won\'t fire!

The link button only sets some value as true and does nothing else.

When I run the code the LinkButton's event just won't fire!

In my aspx page I got this LinkButton inside of a repeater with CommandName="SetDefault", some ID, runat property. That's it.

In my code, inside of myRepeater_Itemcommand(), I got this

if (e.CommandName == "SetDefault")
{
    Users obj = new Users();
    obj.IsDefault =开发者_JAVA技巧 true;
}

[EDIT] I resolved it myself. It was a silly mistake. "l" was missing from "SetDefault" in my aspx page :/


It was a silly spelling mistake in the Command Name. I resolved it myself.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号